Exemple #1
0
def joinGame(game_id, player_id):
    currentGame = db.getGame(game_id)
    if currentGame['status'] == "open" and not db.isGameFull(game_id):
        return db.joinGame(game_id, player_id)
    elif db.isGameFull(game_id):
        print('Game is full, sorry!')
    return False
Exemple #2
0
def joinGame(game_id, player_id):
    currentGame = db.getGame(game_id)
    if currentGame['status'] == "open":
        return db.joinGame(game_id, player_id)
    return False
Exemple #3
0
def joinGame(game_id, player_id, avatar):
    print("controller joingame")
    currentGame = db.getGame(game_id)
    if currentGame['status'] == "open":
        return db.joinGame(game_id, player_id, avatar)
    return False