Пример #1
0
        private static bool FindTaxCell(MonopolyCell cell)
        {
            if (cell as PayTaxCell != null)
            {
                return(true);
            }

            return(false);
        }
Пример #2
0
        private static bool FindActionCell(MonopolyCell cell)
        {
            if (cell as ActionCell != null)
            {
                return(true);
            }

            return(false);
        }
Пример #3
0
        public void CommunityCard4Action()
        {
            InitializeTest();
            MonopolyCell current = Game.PlayerPosition[FirstPlayer];

            Assert.AreEqual(0, current.ID);

            PrivateObject obj  = new PrivateObject(Game);
            var           resp = obj.Invoke("CommunityCard4Action", new object[] { FirstPlayer });

            current = Game.PlayerPosition[FirstPlayer];
            Assert.AreEqual(10, current.ID);
        }
Пример #4
0
        public void CommunityCard3Action()
        {
            InitializeTest();
            MonopolyCell current = Game.PlayerPosition[FirstPlayer];

            Assert.AreEqual(0, current.ID);
            PrivateObject obj = new PrivateObject(Game);

            using (StringReader sr = new StringReader("N"))
            {
                Console.SetIn(sr);
                var resp = obj.Invoke("CommunityCard3Action", new object[] { FirstPlayer });
            }
            current = Game.PlayerPosition[FirstPlayer];
            Assert.AreEqual(3, current.ID);
        }
Пример #5
0
        public void ChanceCard5ActionTest()
        {
            InitializeTest();
            MonopolyCell current = Game.PlayerPosition[FirstPlayer];

            Assert.AreEqual(0, current.ID);

            PrivateObject obj = new PrivateObject(Game);

            using (StringReader sr = new StringReader("N"))
            {
                Console.SetIn(sr);
                var resp = obj.Invoke("ChanceCard5Action", new object[] { FirstPlayer });
            }

            current = Game.PlayerPosition[FirstPlayer];
            Assert.AreEqual(19, current.ID);
            Assert.AreEqual(1500, FirstPlayer.TotalMoney);
        }