public Game(IList <IPlayer> players, BettingRule bettingRule, int smallBlind, int bigBlind, PlayersStats playersStats, Deck playingCards) { if (players.Count < 2) { throw new ArgumentException("More than one player is needed to play a game."); } Players = players; BettingRule = bettingRule; SmallBlind = smallBlind; BigBlind = bigBlind; PlayersStats = playersStats; PlayingCards = playingCards; Table = new Table(players.Count, smallBlind, bigBlind); TableUpdateEvent += new GameHandler(Table.UpdatePlayersCount); foreach (Player player in Players) { player.UpdateBetAndChips += new Player.BetHandler(Table.UpdateBetAndChips); } }
public TexasHoldem(IList <IPlayer> players, BettingRule bettingRule, int smallBlind, int bigBlind, PlayersStats playersStats, Deck playingCards) : base(players, bettingRule, smallBlind, bigBlind, playersStats, playingCards) { }
public Game(IList <IPlayer> players, BettingRule bettingRule, int smallBlind, int bigBlind, PlayersStats playersStats) : this(players, bettingRule, smallBlind, bigBlind, playersStats, new StandardDeck()) { }