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); }
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); }
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; }
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; }
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); }
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); }
public PokerHub(IPokerManager manager, IRepository <Story> story) { _story = story; _manager = manager; }