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

endStage event is processed after a new turn starts #899

Closed
delucis opened this issue Jan 30, 2021 · 0 comments · Fixed by #957
Closed

endStage event is processed after a new turn starts #899

delucis opened this issue Jan 30, 2021 · 0 comments · Fixed by #957
Labels

Comments

@delucis
Copy link
Member

delucis commented Jan 30, 2021

If a move that calls events.endStage() triggers the end of the turn (via an endIf for example), then that endStage event is currently run after the set-up for the new turn. This can result in the player who moved last being removed from the activePlayers for the new turn.

Reported on Gitter by @tomnunn who shared this CodeSandbox reproduction.

(This is effectively a duplicate of #769, which reports the inverse problem that an endIf doesn’t yet have access to the new activePlayers.)

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

Successfully merging a pull request may close this issue.

1 participant