Posted: Thu Dec 14, 2006 3:03 pm Post subject: most effective way of making hangman?
i was just wondering how i could draw the hangman when the user enters a letter that is not in the word. Should i use a counter and an if structure and if the counter equals one then draw a part of the man? or is there a more effective way?
Sponsor Sponsor
TokenHerbz
Posted: Thu Dec 14, 2006 5:00 pm Post subject: (No subject)
draw 5 different hang man pics.
Name them, Hangman1 / Hangman2: etc:
Call the hangman apporeriate for display.
[Gandalf]
Posted: Thu Dec 14, 2006 5:03 pm Post subject: (No subject)
You may want to try something like so:
code:
for i : 1 .. bodyPartsLeft
drawBodyPart(i)
end for
Reality Check
Posted: Thu Dec 14, 2006 6:15 pm Post subject: (No subject)
I'd suggest using a for statement with the number of body parts your going to have. That would make things very easy.