Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 most effective way of making hangman?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
qwertyuiop




PostPosted: 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
Sponsor
sponsor
TokenHerbz




PostPosted: 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.

Smile
[Gandalf]




PostPosted: 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




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: