Beispiel #1
0
        private static bool FindTaxCell(MonopolyCell cell)
        {
            if (cell as PayTaxCell != null)
            {
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        private static bool FindActionCell(MonopolyCell cell)
        {
            if (cell as ActionCell != null)
            {
                return(true);
            }

            return(false);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }