This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Updating the _ _ _ _ _ in a hangman game?

 
Klaas Vredevort
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!

I've started programming this Hangman game (no GUI yet, just the basic structure). It reads info from three text files, 1.txt, 2.txt and 3.txt. It runs fine, but doesn't update the _ _ _ _ _ (I don't know the word for it!) after you have chosen a correct letter.

Also, it doesn't add blank spaces between words when you have, for instance: The Beatles. How do I add that?

I will paste the class and driver, and will paste the txt file contents on www.geocities.com/kitaarmykruis/content.txt if anyone can take the time and check it out?

Thanks!

Klaas










 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One reason you haven't had any help here is that your question is not very clear. Many of us don't have the time to go through 100+ lines of code to see what is going on. Can you please describe the behavior of your program in more detail? Also describe how the actual behavior differs from what you expect or want it to do.

For example, you can say something like "When the program starts, it prints _ _ _ _ (one blank for each letter in the word). When the user guesses a letter, the program does... but I want it to do ..." The more specific details you can give the better we will be able to help you. It will help if you can narrow the problem down to a specific method. Please help us help you.

Layne
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic