示例#1
0
        public PokerGame(PokerDealer dealer)
        {
            Dealer = dealer;

            State = PokerGameState.Inactive;
            Deck = new Deck();
            PokerTimer = new PokerGameTimer(this);
            Exporter = new PokerExport();

            CommunityCards = new List<Card>();
            Players = new List<PokerPlayer>();
            ActivePlayers = new List<PokerPlayer>();
            RoundActions = new List<PlayerAction>();
            PokerPots = new List<PokerPot>();
            Viewers = new List<PlayerMobile>();
        }
示例#2
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();
            }
        }