summaryrefslogtreecommitdiff
path: root/swiftstory/Game.py
AgeCommit message (Collapse)Author
2020-09-12Fix accidental use of tuple in enumerationOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-12Remove unused importsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-28Don't use coroutines for functions sending notificationsOlivier Gayot
Functions which generate notifications for clients were all making use of await and async. This is not great because if we add a notification somewhere, we need to change the function to a coroutine and update all invocations (recursively changing all functions to coroutines). Instead, we now add a task to the event loop whenever a notification needs to be generated. This allows to drop the await and async specifiers from mostly everywhere. On the downside, it means that if we send a notification to n clients, we have to register n tasks. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-21Fix reception of cards after playingOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-15Store cards as tuples (id, desc)Olivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-15Don't pass the cards to the constructor of boardOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-15Rework the recycling of the cardsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-15Use enumerate(...) instead of range(len(...))Olivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-15Don't use getters and setters because it's PythonOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-15Add cosmetic changesOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-03-29Change the websocket library for the standard oneOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2018-03-09renamed the project SwiftStoryOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>