Computer Science Canada Maze Problem |
Author: | GuCCIP [ Sat Jan 05, 2013 2:43 pm ] | ||
Post subject: | Maze Problem | ||
What is it you are trying to achieve? How do you direct the whatdotcolor if statement to the mainMenu procedure when the circle or "mouse" has touched the purple line? (Click on Easy when choosing new game) What is the problem you are having? If I directly say the procedure it starts flashing (mainly because it's in a loop) so then i take it out or i use the if statement in another procedure and then call the procedure in the original if statement it simply doesn't work FYI, look at this part: if whatdotcolor (x, y) = purple then mainMenu tries := tries + 1 else if whatdotcolor (x, y) = yellow then display end if
Please specify what version of Turing you are using 4.1.1 |
Author: | evildaddy911 [ Sat Jan 05, 2013 3:15 pm ] |
Post subject: | RE:Maze Problem |
body proc mainMenu var Start, Instructions, Continue, Exit := 0 see anything wrong about this? |
Author: | GuCCIP [ Sat Jan 05, 2013 3:22 pm ] |
Post subject: | Re: Maze Problem |
Fixed but still doesn't fix my problem. |
Author: | evildaddy911 [ Sat Jan 05, 2013 3:43 pm ] |
Post subject: | RE:Maze Problem |
I don't know much about the GUI module, so try checking the Turing Walkthrough for some more information |
Author: | GuCCIP [ Sat Jan 05, 2013 3:56 pm ] |
Post subject: | Re: Maze Problem |
My problem isn't about GUI's, it's how to make it change from one procedure to another without error. Saying again that error that im talking about is in the whatdotcolor if statement. |
Author: | Insectoid [ Sat Jan 05, 2013 3:59 pm ] |
Post subject: | RE:Maze Problem |
You don't want to switch from one procedure to another. Your game is already running 'inside' a main menu procedure. If your game procedure exits, it should automatically return to the main menu procedure. You need to design your menu proc so that when the game exits, the menu keeps doing what it was doing before the game started. |
Author: | Michael3176 [ Sat Jan 05, 2013 4:08 pm ] |
Post subject: | RE:Maze Problem |
add this to your global variables var loser : boolean then and in userInput if whatdotcolor (x, y) = purple then loser := true tries := tries + 1 and at the bottom add exit when loser = true end loop mainMenu |
Author: | GuCCIP [ Sat Jan 05, 2013 4:32 pm ] |
Post subject: | Re: Maze Problem |
I'm left with a different problem but thanks anyways. |