Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Restart Code
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Paul Brenek




PostPosted: Mon May 24, 2004 11:33 am   Post subject: Restart Code

Hi All,

Thanks for the help on my procedures question - it worked perfectly.

New question: I am writing a game and I would like the user to have a button that would allow them to restart the game at any time. The return command terminates execution of the code. Anyone know how to restart the execution of the program from the beginning from a button (from inside the program)?

Thanks for all your help.
Sponsor
Sponsor
Sponsor
sponsor
Paul




PostPosted: Mon May 24, 2004 12:05 pm   Post subject: (No subject)

Have a procedure that resets all the variable values
Have the whole program as a procedure inside a loop

when the button is pressed exit the loop, run the reset values procedure, then call program procedure again. Don't forget to cls lol.
Oh yea, this is source code, don't post for help here.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: