summaryrefslogtreecommitdiff
path: root/swiftstory/game.py
AgeCommit message (Collapse)Author
2021-12-23Feed the picks directly to the board, without storing them firstOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-23Use an enumeration for the game stateOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-23Don't store a reference to a client from the playerOlivier Gayot
The only reason why we had a reference was that we were able to send notifications back to the client. Instead, we now store the notifications at the player level. At the client level, we now have a coroutine that waits for notifications from the player and sends them when available. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-23Fix reception of card having wrong indexOlivier Gayot
When sending a card reception notification, we don't want to provide the index from the whole deck. Instead we want to give a counter corresponding to the player's total number of received cards. 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>