public void ReloadPlayer() { while (PlayerDoneQueue.Count > 0) { var p = PlayerDoneQueue.Dequeue(); if (p.PlayerStauts >= 0) { p.PlayerStauts = PlayerStauts.PrepareBet; PlayerQueue.Enqueue(p); } else { PlayerQuitQueue.Enqueue(p); } } }
/// <summary> /// 一局开始缓存玩家,根据GameInfo需要对玩家重新排列 /// </summary> /// <param name="PlayerList"></param> public void SetCachePlayer(List <ERoomUser> PlayerList, EGameInfo gi) { InitQueue(); var p = PlayerList[gi.FirstPlayerIndex]; PlayerQueue.Enqueue(p); int i = gi.FirstPlayerIndex + 1; while (PlayerQueue.Count < PlayerList.Count) { if (i == PlayerList.Count) { i = 0; } p = PlayerList[i]; PlayerQueue.Enqueue(p); } }