def makeDecline(user, leaveGame = False): raceId, specialPowerId = user.currentTokenBadge.raceId, user.currentTokenBadge.specPowId if user.declinedTokenBadge: user.killRaceInDecline() dbi.delete(user.declinedTokenBadge) callSpecialPowerMethod(specialPowerId, 'decline', user, leaveGame) callRaceMethod(raceId, 'decline', user, leaveGame) user.currentTokenBadge = None
def makeDecline(user, leaveGame=False): raceId, specialPowerId = user.currentTokenBadge.raceId, user.currentTokenBadge.specPowId if user.declinedTokenBadge: user.killRaceInDecline() dbi.delete(user.declinedTokenBadge) callSpecialPowerMethod(specialPowerId, 'decline', user, leaveGame) callRaceMethod(raceId, 'decline', user, leaveGame) user.currentTokenBadge = None
def endOfGame(game, coins = None): game.state = GAME_ENDED if misc_const.TEST_MODE: return {'result': 'ok', 'coins': coins} else: gameState = getGameState(game) game.resetPlayersState() dbi.delete(game) dbi.flush(game) return {'result': 'ok', 'gameState': gameState}
def endOfGame(game, coins=None): game.state = GAME_ENDED if misc.TEST_MODE: return {'result': 'ok', 'coins': coins} else: gameState = getGameState(game) game.resetPlayersState() dbi.delete(game) dbi.flush(game) return {'result': 'ok', 'gameState': gameState}
def endOfGame(game, coins=None): game.state = GAME_ENDED if misc.TEST_MODE: return {"result": "ok", "coins": coins} else: gameState = getGameState(game) game.resetPlayersState() dbi.delete(game) dbi.flush(game) return {"result": "ok", "gameState": gameState}