Sign In Register

How can we help you today?

Start a new topic
Answered

change order / skip some players in Turn-based game

Is that possible to change order / skip some players in Turn-based game?

Like that you can assign the next player.


And is that possible to implement time-out function in turn-based mode?


Thanks!


Best Answer

Hi Jo,


If you call SparkChallenge.consumeTurn(String playerId) the turn token will be moved on to the next player. Turned based mode is essentially sending challenges and responses back and forth between players so you can indeed have an expiry on them. With the above call you can set your challenge up so that when the challenge expires the move will pass onto the next player.


Thanks,

LiamĀ 

1 Comment

Answer

Hi Jo,


If you call SparkChallenge.consumeTurn(String playerId) the turn token will be moved on to the next player. Turned based mode is essentially sending challenges and responses back and forth between players so you can indeed have an expiry on them. With the above call you can set your challenge up so that when the challenge expires the move will pass onto the next player.


Thanks,

LiamĀ 

Login to post a comment