Hangman


Objective:

Your objective is to create a Hangman program.  The program will read in words (or phrases) and hints from a file.  A word/phrase will be chosen at random.  Blanks for each letter in the correct word will be displayed.  When the user guesses a correct letter, it will appear in place of the appropriate blank.  When the user guesses an incorrect letter, something visual will happen to indicate the guess is wrong and that the user has one less guess.  In the traditional Hangman, a part of the body is added.  After a certain number of incorrect guesses, the player loses.

Program Specifications:

  1. ____/10:  The words/phrases and hints will be read in from a file.  There should be no limit on how many words are in the file.
  2. ____/10:  One word/phrase is selected at random and the corresponding hint is displayed.
  3. ____/10:  Blanks or boxes will appear for each letter in the word/phrase.
  4. ____/10:   When the user guesses a letter that is in the word, the letter appears in place of the blank or in the box. 
  5. ____/10:   When the user guesses a letter that is not in the word/phrase, something visual happens to indicate the guess is wrong and that the user is running out of guesses.   You can not just display the number of guesses.
  6. ____/10:  After a certain number of incorrect guesses, the game is over.
  7. ____/10:  The method for guessing letters should be user-friendly.  An example of a user-friendly method is to provide a button for each letter or to have the user press a key on the keyboard.  An example of a method that is not user-friendly is if the user must first click in a textbox and then enter the letter. 
  8. ____/10:  The guessed letters should appear on the screen or the user should be prevented from guessing a letter twice.
  9. ____/10:  EXTRA CREDIT - The length of the game will be based on the number of different letters in the phrase.