Closed andrewosh closed 5 years ago
Added a first pass at get_current_players
here https://github.com/oasislabs/oasis-game-core/commit/9dc706e35412c8bf2f8819be1c556b63fe25304e. @clementfung can you give this a try in the poker demo to see if it fixes your issue?
Looking good now! Closing.
We need to provide a flow method that makes it simpler to select some subset of the players who are allowed to make the next move.
Boardgame.io supports with with the
set_action_players
event, but we don't currently support that, and adding it as an event seems unnecessary.Instead, after a conversation with @clementfung, we decided to add the following method, which simply takes in the current game state, and returns a
Vec<u16>
of all players that are allowed to move:If
get_current_players
returnsNone
, then the standard round-robin approach is used. Otherwise, the resultingVec
is assigned toctx.action_players
.