Example #1
0
        public bool Get(out BotPlayer player)
        {
            if (_bots.Count > 0)
            {
                player = _bots.Dequeue();
                BotsTaked.Add(player);
                return true;
            }

            player = null;
            return false;
        }
Example #2
0
 public void Push(BotPlayer player)
 {
     _bots.Enqueue(player);
     BotsTaked.Remove(player);
 }
Example #3
0
 public int RemovePlayer(BotPlayer player)
 {
     Players.Remove(player);
     return(player.DisconnectWithSettingsDelay());
 }
Example #4
0
 public void PushPlayer(BotPlayer player)
 {
     player.GetServer().RemovePlayer(player);
     _pool.Push(player);
 }
Example #5
0
 public int AddPlayer(BotPlayer player)
 {
     Players.Add(player);
     player.SetServer(this);
     return(player.ConnectWithSettingsDelay());
 }