public Lobby(string name, string hostName, int maxPlayers, GameServerService gameServer) { this.players = new ConcurrentDictionary <string, WebSocket>(); this.LobbyService = new LobbyService(name, hostName, maxPlayers, gameServer); }
public bool TryCreateLobby(string lobbyName, string hostPlayerName, GameServerService service) { return(lobbies.TryAdd(lobbyName, new Lobby(lobbyName, hostPlayerName, maxPlayers, service))); }