Esempio n. 1
0
        public void ResetGame()
        {
            CloseGumps();

            State = PokerGameState.Inactive;

            RoundActions = new List <PlayerAction>();

            CommunityCards.Clear();

            //create and shuffle a new deck
            Deck = new Deck();

            PokerPots.Clear();

            ActivePlayers.Clear();

            foreach (var player in Players.ToArray())
            {
                player.ClearGame();
            }

            ActivePlayers.AddRange(Players.Where(x => x.Currency > 0));

            if (GetActiveElliblePlayersCount() > 1)
            {
                BeginGame();
            }
            else
            {
                StopIntermission();
                ActivePlayers.Clear();
            }
        }