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

Continue the game when players drop out #34

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

yuumasato
Copy link
Collaborator

Make the server move on with the game when a player disconnects.
Whenever a player disconnects the server checks whether it got:

  • all the answer votes;
  • all the answers;
  • all the persona votes;
    And continues the game if the player who dropped out was the only one left to send the answer vote, the answer or the persona vote.

After registering the player's vote for persona we check if everybody
voted and if so, we decide who won the round.
Let's move this code to a function so we can reuse it later.
Check if the player who dropped was the last one remaining to vote for
persona.
Whenever a player drops we need to check if the game is waiting for a
persona decision.
Move similar code to a function in Games service.
After registering the player's vote we check if everybody voted and if
so, we decided who won the round.
Let's move this code to a function so we can reuse it later.
Handle disconnection of player while players are voting on answers.
Let's user the number of rounds opposed to number of round winners.
When a player who will win a round drops out before he sends his vote,
the server won't add him to the list of roundWinners, as he won't be
found in the list of players.
@yuumasato yuumasato requested a review from toshisasaki June 12, 2022 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant