Get move number

Game development with Board Game Arena Studio
Post Reply
Kennyyy
Posts: 9
Joined: 29 November 2013, 00:50

Get move number

Post by Kennyyy »

Hi,

developing a simple game (based on reversi tuto), I would like to know if there is a simple way to retrieve the move number (I need to detect if I'm at the first move) on the sever side (in .game.php). I would like to avoid an SQL request to do it and I can't find it in the doc...

Thanks.

Vincent
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: Get move number

Post by pikiou »

You could use globals (which is equivalent to using a SQL request but simpler, doc here), or you could create a state just for the first move.
Kennyyy
Posts: 9
Joined: 29 November 2013, 00:50

Re: Get move number

Post by Kennyyy »

Yes thanks, a global variable should work here. I could also create a state but I already used two special ones once this first move has been played so if I can avoid one more...
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: Get move number

Post by sourisdudesert »

Hi,

I confirm what pikiou said: a BGA global is the best way to do it.

Cheers,
Post Reply

Return to “Developers”