Example #1
0
        private void StartGame()
        {
            state.Value = CSState.GameInProgress;
            server.StopListening();
            CSLogger.Log($"Game started.");

            lock (clientsLocker)
            {
                clients.ForEach(c =>
                {
                    if (!c.IsInGame && c.Id != gmId.Value)
                    {
                        c.Disconnect();
                    }
                });
            }
        }
Example #2
0
 public void Shutdown()
 {
     logger.Write <Server>("Shutting down server.");
     connectionListener.StopListening();
     communicator.CloseConnectionToAllClients();
 }