Hangman

Create a game similar to Hangman  in which a player guesses letters to try to replicate a hidden word.  Be sure to use the following criteria.

  • Store at least eight words in an array [each word should be 5 or more characters]
  • Randomly select one to be the hidden word.
  • Initially, display the hidden word using asterisks to represent each letter.
  • Allow the user to guess letters to replace the asterisks in the hidden word until the user completes the entire word.
  • If the user guesses a letter that is not in the hidden word, display an appropriate message.
  • If the user guesses a letter that appears multiple times in the hidden word, make sure that each correct letter is placed.
  • sentinel value or escape to quit the game