Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public TexasHoldem(IList <IPlayer> players, BettingRule bettingRule, int smallBlind, int bigBlind, PlayersStats playersStats, Deck playingCards) : base(players, bettingRule, smallBlind, bigBlind, playersStats, playingCards)
 {
 }
Ejemplo n.º 3
0
 public Game(IList <IPlayer> players, BettingRule bettingRule, int smallBlind, int bigBlind, PlayersStats playersStats) : this(players, bettingRule, smallBlind, bigBlind, playersStats, new StandardDeck())
 {
 }