public static void RemoveLobbyClient(NetworkStream client) { if (!LobbyClients.ContainsKey(client)) { return; } LobbyClients.Remove(client); }
public static void AddLobbyClient(NetworkStream client, string name) { System.Console.WriteLine($"Adding {name} to lobby"); LobbyClient newClient = new LobbyClient(name); LobbyClients.Add(client, newClient); Program.Broadcast(new LobbyStatePacket(LobbyClients.Values.ToArray())); }