コード例 #1
0
ファイル: Game.cs プロジェクト: Ylniss/PokerInz
        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);
            }
        }
コード例 #2
0
 public TexasHoldem(IList <IPlayer> players, BettingRule bettingRule, int smallBlind, int bigBlind, PlayersStats playersStats, Deck playingCards) : base(players, bettingRule, smallBlind, bigBlind, playersStats, playingCards)
 {
 }
コード例 #3
0
ファイル: Game.cs プロジェクト: Ylniss/PokerInz
 public Game(IList <IPlayer> players, BettingRule bettingRule, int smallBlind, int bigBlind, PlayersStats playersStats) : this(players, bettingRule, smallBlind, bigBlind, playersStats, new StandardDeck())
 {
 }