Example #1
0
def leave_game(sid):
    dbi.getUser(sid).leaveGame()
    return responded_ok()
Example #2
0
def join_game(sid, gameId):
    dbi.getUser(sid).joinGame(gameId)
    return responded_ok()
Example #3
0
def set_readiness_status(sid, isReady):
    if isReady not in range(2):
        raise BadReadinessStatus
    dbi.getUser(sid).setStatus(isReady)
    return responded_ok()
Example #4
0
def send_message(sid, text):
    user = dbi.getUser(sid)
    dbi.add(Chat(sid, text))
    return responded_ok()