Omnimaga
Calculator Community => Other Calculators => Topic started by: BalancedFury on September 20, 2011, 09:33:43 pm
-
I'm making my first game : Slider of Death, and i'm stuck...
I don't know how to limit the number of slides allowed.. :(
I really need help! :crazy:
-
Your question was a little vague, but I think what you want is something like:
-Make a variable for storing the number of slides so far - start it with 0.
-When users does a slide, add one to that variable.
-After the slide has been completed, check if they've won; assuming they have, thentell them and the game.
-Else, check if the number of slides so far = the limit; assuming they have, then tell them they've lost. Else, wait for the next move.
-
First off, what is a slide?
Also, do you think you can post a sample of your code or a reasonably detailed summary of your code?
Without really knowing what you're having trouble with, it's hard to help you :)
-
First off, what is a slide?
Also, do you think you can post a sample of your code or a reasonably detailed summary of your code?
Without really knowing what you're having trouble with, it's hard to help you :)
Im making a game that contains a series of sliding puzzles. I am trying to limit the number of slides until it is game over.
-
How about you program that in after the actual framework of the program. then you can easily add it in w/o working around it.
-
set a variable.
so like num_of_trial -> C
and you can decrease C whenever you use a turn so you can include like C-1->C
and you can put game over if C=0.
-
Thanks for helping me!
Thank you Come Again~ Ding!(Chinese Bell Sound)