Page 1 of 1

Game help

Posted: June 2nd, 2012, 9:49 am
by kacper130320
Hi could anyone tell me how to do something like:
when enter is pressed than start the game again.
coz I'am working on my tic tac toe game and sometimes I can't be bothered to debug again
so that would be realy helpful

Re: Game help

Posted: June 2nd, 2012, 3:28 pm
by Asimov
Hi kacspar,

You just need to reset all your variables to their initial state.
And also reset the board to it's initial state, that is all.

Asimov

Re: Game help

Posted: June 3rd, 2012, 12:22 am
by chili
Yeah, write a reset function, and then call that function when enter is pressed. You can also call it from your Game construtor and get a two-for-one. ;)