Beispiel #1
0
        public void Pay()
        {
            var playerMoney = banker.Money[player];

            collectCard.Execute(player);
            Assert.AreEqual(playerMoney + 450, banker.Money[player]);
        }
        public void Move()
        {
            utilityCard.Execute(player);
            Assert.AreEqual(BoardConstants.ELECTRIC_COMPANY, boardHandler.PositionOf[player]);

            boardHandler.Move(player, 1);
            utilityCard.Execute(player);
            Assert.AreEqual(BoardConstants.WATER_WORKS, boardHandler.PositionOf[player]);
        }
Beispiel #3
0
        public void Pay()
        {
            BuyHousesAndHotel();

            var playerMoney = banker.Money[player];

            housesAndHotelsCard.Execute(player);

            Assert.AreEqual(playerMoney - 435, banker.Money[player]);
        }
Beispiel #4
0
        public void Pay()
        {
            var playerMoney = banker.Money[player];

            payCard.Execute(player);
            Assert.AreEqual(playerMoney - 10, banker.Money[player]);
        }
Beispiel #5
0
        public void GoBackThreeSpaces()
        {
            var expectedPosition = (boardHandler.PositionOf[player] - 3 + BoardConstants.BOARD_SIZE) % BoardConstants.BOARD_SIZE;

            moveBackCard.Execute(player);

            Assert.AreEqual(expectedPosition, boardHandler.PositionOf[player]);
        }
Beispiel #6
0
        public void PickCard(ICard target)
        {
            if (!Cards.Contains(target))
            {
                throw new InvalidOperationException();
            }

            RevealCard(target);
            target.Execute(this);

            TurnsLeft--;
        }
Beispiel #7
0
        public void Move()
        {
            railroadCard.Execute(player);
            Assert.AreEqual(BoardConstants.READING_RAILROAD, boardHandler.PositionOf[player]);

            railroadCard.Execute(player);
            Assert.AreEqual(BoardConstants.PENNSYLVANIA_RAILROAD, boardHandler.PositionOf[player]);

            railroadCard.Execute(player);
            Assert.AreEqual(BoardConstants.BandO_RAILROAD, boardHandler.PositionOf[player]);

            railroadCard.Execute(player);
            Assert.AreEqual(BoardConstants.SHORT_LINE, boardHandler.PositionOf[player]);
        }
        public void GetOutOfJail()
        {
            getOutOfJailCard.Execute(player);

            Assert.IsTrue(getOutOfJailCard.Held);
        }
Beispiel #9
0
        public void Move()
        {
            passGoCard.Execute(player);

            Assert.AreEqual(BoardConstants.ATLANTIC_AVENUE, boardHandler.PositionOf[player]);
        }
Beispiel #10
0
 public void GoToJail()
 {
     goToJailCard.Execute(player);
     Assert.AreEqual(BoardConstants.JAIL_OR_JUST_VISITING, boardHandler.PositionOf[player]);
     Assert.IsTrue(jailHandler.HasImprisoned(player));
 }