Example #1
0
        /// <summary>
        ///     Remove player from the game
        /// </summary>
        public void RemovePlayer(PokerPlayer player)
        {
            if (player != null)
            {
                //null these here so we know that one of the key players for the next game has left
                if (DealerButton == player)
                {
                    DealerButton = null;
                }
                if (SmallBlind == player)
                {
                    SmallBlind = null;
                }
                if (BigBlind == player)
                {
                    BigBlind = null;
                }

                //Move to view list so that they can continue viewing the game
                if (ActivePlayers.Contains(player))
                {
                    Viewers.Add(player.Owner);
                }

                Players.Remove(player);

                player.LeaveGame(this);
            }
        }
Example #2
0
        /// <summary>
        ///     Remove player from the game
        /// </summary>
        public void RemovePlayer(PokerPlayer player)
        {
            if (player != null)
            {
                //null these here so we know that one of the key players for the next game has left
                if (DealerButton == player)
                {
                    DealerButton = null;
                }
                if (SmallBlind == player)
                {
                    SmallBlind = null;
                }
                if (BigBlind == player)
                {
                    BigBlind = null;
                }

                //Move to view list so that they can continue viewing the game
                if (ActivePlayers.Contains(player))
                    Viewers.Add(player.Owner);

                Players.Remove(player);

                player.LeaveGame(this);
            }
        }