コード例 #1
0
        public void PlayMovesUpToLimitedDistance_MovePossible_PlayMove_NoMovePossible_DecisionUndecided()
        {
            // 16 on 12 is too big a distance
            var cards = new ReadOnlyCollection <int>(new List <int> {
                3, 16
            });
            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.PlayMovesUpToLimitedDistance(cards, info);

            Assert.That(move, Is.EqualTo(expectedMove));
        }
コード例 #2
0
        public void PlayMovesUpToLimitedDistance_MovePossible_PlayMove()
        {
            // plays 15 on 12
            var cards = new ReadOnlyCollection <int>(new List <int> {
                3, 15
            });
            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, 15));

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

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