예제 #1
0
        KeepPlayingIfYouHaveToOrTheNextPlayerCouldNotPlay_HasToPlayAndNextPlayerCouldPlay_DecisionUndecided()
        {
            // has to play 60 or 3
            var cards = new ReadOnlyCollection <int>(new List <int> {
                60, 3
            });
            var rows = TestHelper.GetPreparedRows(1, 2, 70, 75);
            var comm = new List <(int, PlayerCommunication)>();
            var info = new PlayerInformation(1, 2, rows, comm);

            var result = PlayerMoveRules.KeepPlayingIfYouHaveToOrTheNextPlayerCouldNotPlay(cards, info);

            Assert.That(result.Decision, Is.EqualTo(PlayerMoveDecision.Undecided));
        }
예제 #2
0
        KeepPlayingIfYouHaveToOrTheNextPlayerCouldNotPlay_DoesNotHaveToPlayButNextPlayerCouldNotPlay_DecisionUndecided()
        {
            // could play 60 or 3, but does not have to, but should
            var cards = new ReadOnlyCollection <int>(new List <int> {
                60, 3
            });
            var rows = TestHelper.GetPreparedRows(1, 2, 70, 75);
            var comm = new List <(int, PlayerCommunication)>
            {
                (1,
                 new PlayerCommunication(RowOfCardsIdentifier.FirstRowUp,
                                         PlayerCommunicationType.CanNotPlay))
            };
            var info = new PlayerInformation(3, 2, rows, comm);

            var result = PlayerMoveRules.KeepPlayingIfYouHaveToOrTheNextPlayerCouldNotPlay(cards, info);

            Assert.That(result.Decision, Is.EqualTo(PlayerMoveDecision.Undecided));
        }