Пример #1
0
        public void GetResultIfNotEnoughCardsToContinue_BothPlayersHaveCards_ShouldReturnNull()
        {
            _mockPlayerService.Setup(mps => mps.IsPlayerOutOfCards(It.IsAny <Player>())).Returns(false);
            var currentRound = new CurrentRound(new List <Player>()
            {
                new Player("Tester1"), new Player("Tester2")
            });

            var result = _gameRoundService.GetResultIfNotEnoughCardsToContinue(currentRound);

            Assert.IsNull(result);
        }
Пример #2
0
        public SingleCardPlayResult ContinueRoundWithWar()
        {
            var singleCardPlayResult = _gameRoundService.GetResultIfNotEnoughCardsToContinue(_currentRound);

            if (singleCardPlayResult == null)
            {
                //Add extra card to pot before revealing next card for war result
                _gameRoundService.AddCardFromAllPlayersToPot(_currentRound);
                singleCardPlayResult = PlaySingleCardDraw();
            }
            return(singleCardPlayResult);
        }