Ejemplo n.º 1
0
        public void NewGame()
        {
            while (CommunityCards.Size != 0)
            {
                GameDeck.Return(CommunityCards.Draw());
            }
            foreach (Player player in Players)
            {
                while (player.Hand.Size != 0)
                {
                    GameDeck.Return(player.Hand.Draw());
                }
            }

            for (int i = 0; i < ActivePlayers.Count; i++)
            {
                if (Players[i].Money > -500)
                {
                    ActivePlayers[i] = true;
                }
            }

            GameDeck.Shuffle();
            for (int i = 0; i < ActivePlayers.Count; i++)
            {
                if (ActivePlayers[i])
                {
                    Players[i].Hand.Return(GameDeck.Draw());
                    Players[i].Hand.Return(GameDeck.Draw());
                }
            }

            IncrementBlindLocations();
        }