• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

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

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?



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.

First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic