Exemplo n.º 1
0
        public void PlayBackwardsTrick_NoBackwardsTrickPossible_DecisionUndecided()
        {
            // plays 2 on 12
            var cards = new ReadOnlyCollection <int>(new List <int> {
                3, 69
            });
            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.PlayBackwardsTrick(cards, info);

            Assert.That(move, Is.EqualTo(expectedMove));
        }
Exemplo n.º 2
0
        public void PlayBackwardsTrick_BackwardsTrickOnDownPossible_PlayBackwardsTrickOnDown()
        {
            // plays 85 on 75
            var cards = new ReadOnlyCollection <int>(new List <int> {
                85, 13
            });
            var rows = TestHelper.GetPreparedRows(11, 12, 70, 75);
            var comm = new List <(int, PlayerCommunication)>();

            var info = new PlayerInformation(0, 2, rows, comm);

            var expectedMove = new PlayerMove(PlayerMoveDecision.WantToPlay,
                                              new CardPlacement(RowOfCardsIdentifier.SecondRowDown, 85));

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

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