Пример #1
0
 public void SetUp()
 {
     dice = new LoadedDice();
     player1 = "Horse";
     players = new List<String> { player1 };
     banker = new Banker(players, 1500);
     var boardFactory = new BoardFactory();
     var guard = new PrisonGuard(banker, dice);
     board = boardFactory.Create(banker, players, dice, guard);
 }
Пример #2
0
        public void IfAPlayerRollsDoublesTheyGetToTakeAnExtraTurn()
        {
            var dice = new LoadedDice();
            var rolls = new[] { 3, 3, 2, 1 };
            dice.SetNumberToRoll(rolls);
            game = new Game(players, dice, board, turns, guard);

            game.TakeTurn(player1);

            Assert.That(board.GetPosition(player1), Is.EqualTo(9));
        }
Пример #3
0
        public void IfAPlayerRollsDoublesThriceTheyGoToJail()
        {
            var dice = new LoadedDice();
            var rolls = new[] { 3, 3, 2, 2, 4, 4, 1, 2 };
            dice.SetNumberToRoll(rolls);
            game = new Game(players, dice, board, turns, guard);

            game.TakeTurn(player1);

            Assert.That(board.GetPosition(player1), Is.EqualTo(10));
        }