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

End round after all players have stayed #10

Closed
codegard1 opened this issue Jul 5, 2017 · 1 comment
Closed

End round after all players have stayed #10

codegard1 opened this issue Jul 5, 2017 · 1 comment
Assignees

Comments

@codegard1
Copy link
Owner

If all players stay (status code 2) then the round ends and a winner is determined.

  • Each time _evaluateGame(2) is called, check if all players have stayed
    • if not then update currentPlayer and set player.turn for the next player
      • also add the id of the player who last stayed to state.stayedPlayers before updating currentPlayer and player.turn
    • if so then a check function in exitTrap will catch the situation and evaluate the appropriate status code depending on who the winning player is
@codegard1 codegard1 self-assigned this Jul 5, 2017
@codegard1
Copy link
Owner Author

codegard1 commented Jul 14, 2017

This was implemented in 9b22448 but it needs more testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant