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'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