Computer Science Canada Floorplan in Turing- Need Help! |
Author: | chinfin [ Fri May 28, 2010 10:49 am ] | ||
Post subject: | Floorplan in Turing- Need Help! | ||
What is it you are trying to achieve? I am trying to make a floorplan which has lights in it- with a menu to turn the lights on and off What is the problem you are having? <I am trying to make a menu with this floorplan and want to turn the lights on (room turns yellow) and off (room turns greyish black)> Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <My code is below>
Please specify what version of Turing you are using <4.1.1> |
Author: | DemonWasp [ Fri May 28, 2010 12:19 pm ] |
Post subject: | RE:Floorplan in Turing- Need Help! |
...and what's the problem you're running into, and what have you tried to solve it? |
Author: | chinfin [ Fri May 28, 2010 1:38 pm ] |
Post subject: | RE:Floorplan in Turing- Need Help! |
I'm not sure how to put lights and make a menu to turn them on and off in each room.. I am a beginner... if someone could help me that would be great. |
Author: | BigBear [ Fri May 28, 2010 1:49 pm ] |
Post subject: | RE:Floorplan in Turing- Need Help! |
Alright so you have the drawing all done. I would make a drawFloorPlan procedure, to take all of that clutter out of your main loop. Does a yellow circle in each room mean the lights are on? If so you could just accept input then if they want to turn the lights on draw a yellow circle at a certain spot. You might need to redraw your title or grid over top of the yellow but that's OK if it is in a function |
Author: | chinfin [ Fri May 28, 2010 2:00 pm ] |
Post subject: | RE:Floorplan in Turing- Need Help! |
can you do it for me? |
Author: | BigBear [ Fri May 28, 2010 4:06 pm ] |
Post subject: | RE:Floorplan in Turing- Need Help! |
get input if they say they want it on in room #1 draw it here if they want room#2 draw it here etc you already got a procedure so you should know how to put the drawing in one |
Author: | chinfin [ Sat May 29, 2010 9:17 am ] |
Post subject: | RE:Floorplan in Turing- Need Help! |
oh man im not sure how to do this |
Author: | BigBear [ Sat May 29, 2010 12:25 pm ] |
Post subject: | RE:Floorplan in Turing- Need Help! |
Did you write that code, it is all in that program. |
Author: | supaphreek [ Sat May 29, 2010 12:26 pm ] |
Post subject: | RE:Floorplan in Turing- Need Help! |
Its as big bear said. Now im assuming that if there is a yellow light, it means the light is on. So what you have to do is create the floorplan without the yellow circles which would be your basic thing. Then you have get input if input = "1" then drawfilloval ... elsif input = "2" then drawfilloval ... and so on. |