How do I know on the cloud who's turn it is? The client API has a nextPlayer field. What should I be using on the cloud?
I have 4+ players and I would like to list information about them in turn order in the UI along with an indicator of whose turn it is. I see the next player field but how do I get a list of players in turn order?
Is there any way to get an order of turns for any challenge in the case of 5 players?
I'm trying to setup the initial game state. When the challenge starts, I'd like the cloud to know the order of the players and who is to act first. Is the global ChallengeStartedMessage the right place to do this? Spark.getData().nextPlayer returns null/undefined.
The following will get the nextPlayer in the ChallengeStartedMessage.
var nextPlayer = Spark.getData().challenge.nextPlayer