Пример #1
0
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
Пример #2
0
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
Пример #3
0
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}
Пример #4
0
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}
Пример #5
0
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}