Пример #1
0
        public void DoNotMoveCurrentPlayerIfInPenaltyBoxAndRollEvenDice()
        {
            var player1  = new Player("1", "player1", true, 0, 0, null);
            var player2  = new Player("2", "player2");
            var game     = GetGame(player1, player2);
            var fakeDice = new FakeDice(2);
            var events   = game.Move(fakeDice, player1.Id);

            Check.That(events).ContainsExactly(new CurrentPlayerChanged(player2.Id));
        }
Пример #2
0
        public void MoveCurrentPlayer()
        {
            var player1  = new Player("player1");
            var player2  = new Player("player2");
            var game     = GetGame(player1, player2);
            var fakeDice = new FakeDice(2);

            var events = game.Move(fakeDice, player1.Id);

            var question = game.QuestionDeck.Categories.First().Questions.First().Question;

            Check.That(events).ContainsExactly(new Moved(player1.Id, 2), new QuestionAsked(question.Id, question.Text));
        }
Пример #3
0
        public void MoveCurrentPlayerIfInPenaltyBoxButRollOddDice()
        {
            var player1  = new Player("1", "player1", true, 0, 0, null);
            var player2  = new Player("2", "player2");
            var game     = GetGame(player1, player2);
            var fakeDice = new FakeDice(3);

            var events = game.Move(fakeDice, player1.Id);

            var question = game.QuestionDeck.Categories.First().Questions.First().Question;

            Check.That(events).ContainsExactly(
                new GetOutOfPenaltyBox(player1.Id), new Moved(player1.Id, 3), new QuestionAsked(question.Id, question.Text));
        }