Ejemplo n.º 1
0
        public void PropertySquare_RentIsDoubledWhenAllPropertiesAreOwnedButNoStructuresArePresent()
        {
            Board board = new Board();

            Player player1 = new Player("Player1");

            player1.AddCash(2000);

            Player player2 = new Player("Player2");

            player2.AddCash(2000);

            PropertySquare boardwalkSquare = (PropertySquare)board.GetSquareAtPosition(39);

            boardwalkSquare.Owner = player1;

            PropertySquare parkPlaceSquare = (PropertySquare)board.GetSquareAtPosition(37);

            parkPlaceSquare.Owner = player1;

            boardwalkSquare.ApplyEffect(board, player2, 2);

            Assert.AreEqual(1900, player2.CashOnHand);
            Assert.AreEqual(2100, player1.CashOnHand);
        }
Ejemplo n.º 2
0
        public void PropertySquare_RentIsStatedAmountWhenNotAllPropertiesAreOwned()
        {
            Board board = new Board();

            Player player1 = new Player("Player1");

            player1.AddCash(2000);

            Player player2 = new Player("Player2");

            player2.AddCash(2000);

            PropertySquare boardwalkSquare = (PropertySquare)board.GetSquareAtPosition(39);

            boardwalkSquare.Owner = player1;

            boardwalkSquare.ApplyEffect(board, player2, 2);

            Assert.AreEqual(1950, player2.CashOnHand);
            Assert.AreEqual(2050, player1.CashOnHand);
        }