Beispiel #1
0
        public void PlayMovesUpToLimitUnlessBlockedByCommunication_MovePossibleButBlocked_DecisionUndecided()
        {
            // 13 on 12 is possible, but blocked
            var cards = new ReadOnlyCollection <int>(new List <int> {
                3, 13
            });
            var rows = TestHelper.GetPreparedRows(11, 12, 70, 75);
            var comm = new List <(int, PlayerCommunication)>();
            var info = new PlayerInformation(1, 2, rows, comm);

            var expectedMove = new PlayerMove(PlayerMoveDecision.Undecided);

            var move = PlayerMoveRules.PlayMovesUpToLimitUnlessBlockedByCommunication(cards, info);

            Assert.That(move, Is.EqualTo(expectedMove));
        }
Beispiel #2
0
        public void PlayMovesUpToLimitUnlessBlockedByCommunication_MovePossible_PlayMove()
        {
            // plays 17 on 12
            var cards = new ReadOnlyCollection <int>(new List <int> {
                3, 17
            });
            var rows = TestHelper.GetPreparedRows(11, 12, 70, 75);
            var comm = new List <(int, PlayerCommunication)>();
            var info = new PlayerInformation(1, 2, rows, comm);

            var expectedMove = new PlayerMove(PlayerMoveDecision.WantToPlay,
                                              new CardPlacement(RowOfCardsIdentifier.SecondRowUp, 17));

            var move = PlayerMoveRules.PlayMovesUpToLimitUnlessBlockedByCommunication(cards, info);

            Assert.That(move, Is.EqualTo(expectedMove));
        }