示例#1
0
def quick_join(game_type):
    print "quick_join", game_type
    response = lobbyservice.create_lobby(CreateLobbyRequest(userId=session['userId'], gameType=game_type))
    if (isinstance(response, CreateLobbyResponse)):
        pass
    start_game_response = lobbyservice.start_game(StartGameRequest(userId=session['userId'], lobbyId=response.lobbyId))
    if (isinstance(start_game_response, StartGameResponse)):
        pass
    return redirect(url_for('active_games'))
示例#2
0
def create_lobby(game_type):
    print "create lobby "
    response = lobbyservice.create_lobby(CreateLobbyRequest(userId=session['userId'], gameType=game_type))
    #response = lobbyservice.getLobbyId(CreateLobbyRequest(userId=session['userId'], gameType=game_type))
    if (isinstance(response, CreateLobbyResponse)):
        pass
        #print response
    return redirect(url_for('lobby', game_type=game_type,
                                    lobby_id=response.lobbyId))