public void TwoPlayerRoll()
        {
            Game = new GameConfiguration().StartGame(
                delegate { },
                null,
                CALIN_PLAYER, JOHN_PLAYER);
             AnswerController answerController = new AnswerController(Game.GiveCorrectAnswerAndCheckIfNOTWinner, Game.wrongAnswer);

            Assert.AreEqual(CalinPayerIndex, Game.CurrentPlayer);
            Game.Roll(3);
            answerController.GiveAnswer(new Random().Next(9));
            Assert.AreEqual(JohnPlayerIndex, Game.CurrentPlayer);
        }
Exemple #2
0
        public void ThirdPlayerTurn()
        {
            var playersController = new PlayersController(3);
            Game = new GameConfiguration().StartGame(
                            delegate { },
                            playersController,
                            CALIN_PLAYER, JOHN_PLAYER, ANDREW_PLAYER);
            AnswerController answerController = new AnswerController(Game.GiveCorrectAnswerAndCheckIfNOTWinner, Game.wrongAnswer);

            answerController.GiveAnswer(new Random().Next(9));
            answerController.GiveAnswer(new Random().Next(9));

            Assert.AreEqual(ThirdPlayerIndex, Game.CurrentPlayer);
            Assert.AreEqual(ThirdPlayerIndex, playersController.CurrentPlayer);
        }
 public void Setup()
 {
     Game = new GameConfiguration().StartGame(delegate { }, null, CALIN_PLAYER, JOHN_PLAYER);
 }