Skip to content

Setting next player and phase at the same time #948

Answered by delucis
JoeLudwig asked this question in Q&A
Discussion options

You must be logged in to vote

Currently the best way to do this is using the phase’s turn.order.first method. If the heuristic of who starts the end-of-round phase is predictable, you can have all the logic there and be guaranteed that entering the phase always results in the correct starting player. If it’s essential to set the player from the same place as the setPhase event, you can store the starting player temporarily in G and then read that in your first method. (As a side note, if only some players are in this end of round phase, you may also wish to use turn.order.playOrder to only include those. Then your actual move logic can be as simple as endTurn with no need for next or other logic.)

Docs: https://boardg…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by delucis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #930 on June 02, 2021 10:09.