public void Tick() { while (IsListening && _listener.Pending()) { AddClient(new CoreClient(this, _listener.AcceptTcpClient())); } foreach (CoreClient client in _clients) { client.Tick(); } Game.TimeTick(); while (_removedClients.Count > 0) { _clients.Remove(_removedClients[0]); _removedClients.RemoveAt(0); } if (_closePending && _clients.Count == 0) { Stop(); } }