Exemplo n.º 1
0
 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());
     }
 }
Exemplo n.º 2
0
 public IResponse API_CreateGameRoom(Session session, CreateGameRoomRequest request)
 {
     if (!TryGetDecks(request.SelectedDecks, out Deck[] decks))
Exemplo n.º 3
0
 protected virtual IResponse On(CreateGameRoomRequest request) => throw new NotImplementedException(nameof(CreateGameRoomRequest));