Hangman is a guessing game .A player thinks of a word, phrase or sentence and tries to guess it by suggesting letters or numbers, within a certain number of guesses.The word to guess is represented by a row of dashes, representing each letter of the word.
If the guessing player cannot be able to suggest a letter which occurs in the word,one element of a hanged man is added.
The player guessing the word may, at any time, attempt to guess the whole word. If the word is correct, the game is over and the guesser wins. Otherwise,the guesser is penalized by adding an element to the diagram.
On the other hand, if the player makes enough incorrect guesses, the game is also over. However, the guesser can also win by guessing all the letters or numbers that appears in the word, thereby completing the word, before the diagram is completed.