Page 1 of 1

Get move number

Posted: 01 December 2013, 03:43
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

Re: Get move number

Posted: 01 December 2013, 12:46
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.

Re: Get move number

Posted: 02 December 2013, 02:33
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...

Re: Get move number

Posted: 02 December 2013, 12:38
by sourisdudesert
Hi,

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

Cheers,