Game help

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
kacper130320
Posts: 50
Joined: May 19th, 2012, 3:00 pm

Game help

Post by kacper130320 » June 2nd, 2012, 9:49 am

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

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Game help

Post by Asimov » June 2nd, 2012, 3:28 pm

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
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Game help

Post by chili » June 3rd, 2012, 12:22 am

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. ;)
Chili

Post Reply