Exemplo n.º 1
0
        private void CollectPotWinnings(Player player)
        {
            //Introduce some randomness by shuffling the pot deck before adding to the player's deck
            var winnings = _gameRoundService.GetRoundWinnings(_currentRound);

            _dealerService.ShuffleDeck(winnings);
            player.Deck.AddRange(winnings);
        }
Exemplo n.º 2
0
        public void GetRoundWinnings_WithCards_ShouldReturnCardPot()
        {
            var cards = new List <Card>()
            {
                new Card(Suit.Clubs, Rank.Eight), new Card(Suit.Diamonds, Rank.Jack)
            };
            var currentRound = new CurrentRound(new List <Player>(), cards);

            var result = _gameRoundService.GetRoundWinnings(currentRound);

            CollectionAssert.AreEqual(cards, result);
        }