Kata > Hangman

The game is started with a word and a permitted number of incorrect guesses.

The player can see the length of the word but not the letters.

The player guesses letters.

If the letter is in the word, all instances of it are revealed.

If the letter is not in the word, a penalty is added.

If all letters in the word are revealed, the game is won.

If the maximum number of penalties is reached, the game is lost.

Implement a hangman game.