Exemplo n.º 1
0
        public ERoomUser PeekAvaliblePlayer(EGameInfo gi)
        {
            ERoomUser result = null;

            //只剩一个人时,比赛也是结束了
            if (PlayerQueue.Count + PlayerDoneQueue.Count == 1)
            {
                return(null);
            }

            while (PlayerQueue.Count > 0)
            {
                var Player = PlayerQueue.Peek();
                if (Player.PlayerStauts == PlayerStauts.PrepareBet)
                {
                    result = Player;
                    break;
                }
                else
                {
                    PlayerQuitQueue.Enqueue(PopPlayer(Player.PlayerStauts));
                }
            }


            return(null);
        }