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

API extension: mark player as defeated/left for a game, all others are marked alive/playing #45

Open
CrsiX opened this issue Jun 4, 2023 · 0 comments
Labels
needs-implementation Issue should be implemented

Comments

@CrsiX
Copy link
Member

CrsiX commented Jun 4, 2023

In the response provided via #44, the defeated/left players should be included, though.

Only the player itself should be able to leave a running game (= get marked as defeated) for itself. At game start, nobody is marked. Whether the in-game 1:1-chat is retained after a player left the game is up to discussion. This endpoint is somewhat idempotent: resigning is only possible once and irreversible.

This may open the door for removing a game:
If every player is marked as left, the game can be cleaned up properly.

This functionality currently does not need to inspect game data. The client will know when it has lost and offer the player the feature to "delete" the game (only locally, of course), which will use that endpoint. Also, if a player wants to resign from a game, that endpoint will be used.
If only one player is left, it's either single-player or the victorious user: that user may quit any time using that endpoint as well, but the game will not do it automatically.

@CrsiX CrsiX added the enhancement New feature or request label Jun 4, 2023
@CrsiX CrsiX added needs-implementation Issue should be implemented and removed enhancement New feature or request labels Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-implementation Issue should be implemented
Projects
None yet
Development

No branches or pull requests

1 participant