Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle player quitting the game #213

Open
piggydoughnut opened this issue May 12, 2021 · 0 comments
Open

Handle player quitting the game #213

piggydoughnut opened this issue May 12, 2021 · 0 comments
Labels
alpha Need to be solved for alpha release

Comments

@piggydoughnut
Copy link
Collaborator

The player can quit the game in three ways:

    • Kill their player node. (Already implemented, it is treated as fold)
    • Close the GUI window .

Alpha - When the GUI window is closed, the socket is killed. The backend should identify when this happens and make that player fold.

Beta - In the future we will allow players to reconnect in case they accidentally closed the window or something. So we could implement something like a timeout (waiting for about a minute for the player to reconnect) and in the meantime having the player check in case it is his turn and the socket connection was lost.

    • Opt out to leave the table at next hand.

The player can decide to leave the table at next hand. There is a checkbox showed to them at the bottom of the screen "Leave the table at next hand". Once that is checked, the backend receives {method: 'leaveTable', value: 0}. The backend needs to handle that message and not include the player on the next hand. The easiest way is to close the socket for the player who decided to leave before the next hand starts.

@piggydoughnut piggydoughnut added the alpha Need to be solved for alpha release label May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha Need to be solved for alpha release
Projects
None yet
Development

No branches or pull requests

1 participant