The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

jmitchell (3) [Avatar] Offline
It's possible to construct a game where either:

* there are letters to guess which aren't in the secret word (e.g. `MkWordState "Test" ['T', 'E', 'S', 'X']`)
* there are duplicate letters which means the player has to guess a single letter multiple times (e.g. `MkWordState "Test" ['T', 'E', 'S', 'T']`)
* there are lower-case letters which can't ever match input due to `toUpper` (e.g. `MkWordState "Test" ['T', 'E', 'S', 'x']`)

Fixing these issues would make for a good exercise.

jmitchell (3) [Avatar] Offline
Hangman is revisited in Chapter 14, and these issues are resolved in the `NewGame` smart constructor and the `letters` helper function.