Example #1
0
        private void CheckWinners(ICollection <ICharacter> players, IPokerManager dealer)
        {
            for (int i = 0; i < dealer.Cards.Count; i++)
            {
                dealer.ShowCardAtPosition(i);
            }

            foreach (var player in players)
            {
                for (int i = 0; i < player.Cards.Count; i++)
                {
                    player.ShowCardAtPosition(i);
                }
            }

            var winners = this.GetWinners(players);

            if (this.GetNotFoldedPlayersCount(this.GetAllPlayers()) != 1)
            {
                this.ShowWinnersMessages(winners);
            }

            this.SetWinnersChips(winners);
        }
Example #2
0
        private void CheckWinners(ICollection<ICharacter> players, IPokerManager dealer)
        {
            for (int i = 0; i < dealer.Cards.Count; i++)
            {
                dealer.ShowCardAtPosition(i);
            }

            foreach (var player in players)
            {
                for (int i = 0; i < player.Cards.Count; i++)
                {
                    player.ShowCardAtPosition(i);
                }
            }

            var winners = this.GetWinners(players);
            if (this.GetNotFoldedPlayersCount(this.GetAllPlayers()) != 1)
            {
                this.ShowWinnersMessages(winners);
            }

            this.SetWinnersChips(winners);
        }