• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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










 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You learn how to close your eyes and tell yourself "this just isn't really happening to me." Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic