File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Updating the _ _ _ _ _ in a hangman game? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Updating the _ _ _ _ _ in a hangman game?" Watch "Updating the _ _ _ _ _ in a hangman game?" New topic

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

Klaas Vredevort

Joined: Dec 27, 2005
Posts: 29
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 if anyone can take the time and check it out?



Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
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.


Java API Documentation
The Java Tutorial
I agree. Here's the link:
subject: Updating the _ _ _ _ _ in a hangman game?
jQuery in Action, 3rd edition