summaryrefslogtreecommitdiff
path: root/swiftstory/game_manager.py
AgeCommit message (Collapse)Author
2021-12-23Refactor GameManager and add control over game creationOlivier Gayot
GameManager had a method called join_game ; which was not actually doing any joining. Instead, it was just returning a reference to the game that would match the specified game name and language. In case the game would not exist, it would be created before being returned. The function is now renamed find_by_name. Also a new parameter "create" has been added. It is a boolean that controls whether a game would be created if it does not exist. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-23Move FS operation outside the initializer of GameManagerOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-23Use a language container rather than a dictionaryOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-23Add required annotations to make sure mypy succeedsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-23Use lowercase module namesOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>