Computer Science Canada Dice Game |
Author: | GamingFusion [ Thu Oct 29, 2009 11:15 am ] | ||
Post subject: | Dice Game | ||
I am trying to make a Turing Dice Game. i want it so when the user presses the ENTER KEY, it will quit my loop for roll the dice images and displays the random dice images. I dont have the random cide number yet but thats easy enough. I want it to check until the ENTER KEY is pressed I have tried putting in a double loop and a single loop checking for a key press after every image but both didnt work
I am Using Turing 4.1.1 |
Author: | Tony [ Thu Oct 29, 2009 11:26 am ] |
Post subject: | RE:Dice Game |
you have the right idea for exiting the Roll loop. Now, how would you exit the RollDie loop? |
Author: | GamingFusion [ Thu Oct 29, 2009 11:33 am ] |
Post subject: | RE:Dice Game |
i tried that with a exit when chars (chr (10)) but it doesnt check always only when it is checking and thats in between each Pic.Draw |
Author: | Tony [ Thu Oct 29, 2009 11:43 am ] | ||
Post subject: | RE:Dice Game | ||
you have no exit statement from the loop. Also, you are doing 6 different things in there. So either you will need to have 6 separate checks and exits (ugly) or figure out how to not have nested loops, and draw just one picture at a time (preferred solution). Here's a hint
|
Author: | GamingFusion [ Fri Oct 30, 2009 9:45 am ] | ||
Post subject: | Re: Dice Game | ||
OK i fixed it, the way did it was the way i should have done it in the first place Heres my new code
|