protected override IResponse On(CreateGameRoomRequest request) { if (Left) { return(null); } if (LoggedIn) { if (!InGameRoom) { if (request.MaxPlayers > 1 && request.Name.Length > 0) { return(Lobby.API_CreateGameRoom(this, request)); } else { return("Invalid request parameters".AsError()); } } else { return("In a game room already".AsError()); } } else { return("Not logged in".AsError()); } }
public IResponse API_CreateGameRoom(Session session, CreateGameRoomRequest request) { if (!TryGetDecks(request.SelectedDecks, out Deck[] decks))
protected virtual IResponse On(CreateGameRoomRequest request) => throw new NotImplementedException(nameof(CreateGameRoomRequest));