Closed slwoodward closed 4 years ago
@slwoodward I am assigning this to you to come up with a specific plan for what happens when a player quits and document that in the wiki where appropriate. Once there is a specific plan of what to implement we can make it a planned feature an put it in a project as a card with todos.
The current suggestion is to remove them from the turn order and continue. However that doesn't specify what should happen to their cards, and how their leaving should be represented to other players (removing them is easiest and their cards just leaving the game all together, showing them but skipping them is harder, and in the case of an unexpected disconnection their cards are irrecoverable to put in the discards or deck.) Also should we attempt to create a 'reconnect' mechanism at all? I think not b/c state tracking is on the client side so much.
I have, in response to the disconnect issue, implemented a less perfect version of skipping. I remove the player from the list entirely. This does have the side-effect of removing them from the UI completely and removing the information about card distribution that was available from their tableView, however it is SO MUCH SIMPLER than trying to implement a skip list that I find it acceptable unless others really press.
We currently do nothing about a player quitting, which won't work.
I suggest we skip that players turn by keeping track of a skip list (will need to map player to turn no).
A simpler alternative would be to end the game. We could also remove the player entirely, including visible cards (to avoid UI issues).