Computer Science Canada How do you restart a game in turing after you have shown them that you have lost or won |
Author: | ZZK [ Fri Apr 30, 2010 6:01 am ] |
Post subject: | How do you restart a game in turing after you have shown them that you have lost or won |
What is it you are trying to achieve? Trying to get a restart option in my hangman game What is the problem you are having? I dont know how to have a restart button Please specify what version of Turing you are using 4.1 |
Author: | ProgrammingFun [ Fri Apr 30, 2010 7:14 am ] | ||
Post subject: | Re: How do you restart a game in turing after you have shown them that you have lost or won | ||
You could put the whole thing in a loop. In the end, ask if you want to play again. If player says yes, end if If player says no, exit loop.
Above is a basic example (may have syntax errors tho). |
Author: | Kharybdis [ Fri Apr 30, 2010 9:51 am ] |
Post subject: | RE:How do you restart a game in turing after you have shown them that you have lost or won |
If you're using procedures and functions, just have a procedure for your "main game', and then your actual 'main' procedure. In that main procedure, create a loop. To run the game, just call the "main game" procedure. When that procedure ends, ask them if they want to play again. If not, you just stop the loop, and boom, you're done. Otherwise, it'll run the procedure "main game" once again. |
Author: | ProgrammingFun [ Fri Apr 30, 2010 3:17 pm ] |
Post subject: | RE:How do you restart a game in turing after you have shown them that you have lost or won |
Kharybdis has a good and efficient point. |
Author: | copthesaint [ Fri Apr 30, 2010 9:43 pm ] | ||||
Post subject: | Re: How do you restart a game in turing after you have shown them that you have lost or won | ||||
Heres a way to reset your program, I made these two files so you can try it out. Save this file as Circle.t and then generate an executable of it.
This file is going to run the Circle program.
So just make the file that will load the game the 'main menu' and then have your main menu start the game. you can do this in alot of ways, Im just showing you how there are alot of options for how to do this and opening your mind to new Ideas. |
Author: | ponchu [ Thu Feb 05, 2015 9:09 am ] |
Post subject: | RE:How do you restart a game in turing after you have shown them that you have lost or won |
hey, wondering how to restart by pressing a GUI button instead of imputing a letter such as "y" thanks |
Author: | Insectoid [ Thu Feb 05, 2015 4:29 pm ] |
Post subject: | RE:How do you restart a game in turing after you have shown them that you have lost or won |
It's the same concept. If you understand how to use the GUI, this tutorial should be adequate help. |