Example #1
0
        public async Task SetAllCards(IList<ICharacter> characters, IPokerManager pokerManager)
        {
            this.ShuffleDeck();
            int charactersCount;
            for (charactersCount = 0; charactersCount < characters.Count; charactersCount++)
            {
                await this.SetCardToCharacters(characters[charactersCount], charactersCount, 2);
            }

            await this.SetCardToPokerManager(pokerManager, 5, charactersCount * 2);
        }
Example #2
0
        public async Task SetAllCards(IList <ICharacter> characters, IPokerManager pokerManager)
        {
            this.ShuffleDeck();
            int charactersCount;

            for (charactersCount = 0; charactersCount < characters.Count; charactersCount++)
            {
                await this.SetCardToCharacters(characters[charactersCount], charactersCount, 2);
            }

            await this.SetCardToPokerManager(pokerManager, 5, charactersCount * 2);
        }
Example #3
0
 public Engine(ICharacter player, ICollection<ICharacter> bots, ISingleBet bet, IPokerManager pokerManager, IDeck deck, IMessage message, IHandPower type, ICheckHand checkHandType)
 {
     this.player = player;
     this.bots = new List<ICharacter>(bots);
     this.Bet = bet;
     this.pokerManager = pokerManager;
     this.deck = deck;
     this.Message = message;
     this.winningHand = new Type();
     this.BigBlind = GameConstants.DefautBigBlind;
     this.SmallBlind = GameConstants.DefautSmallBlind;
     this.SetDefaultCall();
     this.Raise = 0;
     this.hasRaisedPlayers = false;
     this.ClassificattorType = type;
     this.CheckHandType = checkHandType;
     this.raisedTurn = 1;
 }
Example #4
0
 public Engine(ICharacter player, ICollection <ICharacter> bots, ISingleBet bet, IPokerManager pokerManager, IDeck deck, IMessage message, IHandPower type, ICheckHand checkHandType)
 {
     this.player       = player;
     this.bots         = new List <ICharacter>(bots);
     this.Bet          = bet;
     this.pokerManager = pokerManager;
     this.deck         = deck;
     this.Message      = message;
     this.winningHand  = new Type();
     this.BigBlind     = GameConstants.DefautBigBlind;
     this.SmallBlind   = GameConstants.DefautSmallBlind;
     this.SetDefaultCall();
     this.Raise              = 0;
     this.hasRaisedPlayers   = false;
     this.ClassificattorType = type;
     this.CheckHandType      = checkHandType;
     this.raisedTurn         = 1;
 }
Example #5
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 #6
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 #7
0
 public PokerHub(IPokerManager manager, IRepository <Story> story)
 {
     _story   = story;
     _manager = manager;
 }