Exemple #1
0
        public static void RemoveLobbyClient(NetworkStream client)
        {
            if (!LobbyClients.ContainsKey(client))
            {
                return;
            }

            LobbyClients.Remove(client);
        }
Exemple #2
0
        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()));
        }