pep.py/constants/gameModes.py

24 lines
441 B
Python
Raw Normal View History

2016-04-19 17:40:59 +00:00
"""Contains readable gamemodes with their codes"""
std = 0
taiko = 1
ctb = 2
mania = 3
def getGameModeForDB(gameMode):
"""
Convert a gamemode number to string for database table/column
gameMode -- gameMode int or variable (ex: gameMode.std)
return -- game mode readable string for db
"""
if gameMode == std:
return "std"
elif gameMode == taiko:
return "taiko"
elif gameMode == ctb:
return "ctb"
else:
return "mania"