Exemple #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'))
Exemple #2
0
def start_game(game_type,lobby_id):
    print "start game"
    start_game_response = lobbyservice.start_game(StartGameRequest(userId=session['userId'], lobbyId=lobby_id))
    if (isinstance(start_game_response, StartGameResponse)):
        pass
    return redirect(url_for('active_games'))