The game of hangman a classic guess-the-word game. You can try hangman online, but do not play too long - just learn the rules.
(string-contains-letter? str letter)
.define/contract
(if discussed in class).Outline of everything to do for hangman project.
How to load a sequence of images into DrRacket.
Every keypress is a guess - adjust the model accordingly.
The key step is to draw the word with underscores for the letters missed. This page will not include any specific advice on how to draw the word with underscores for the letters that are not guessed. The wipeout function below should provide you will all of the skills you need to do it, though. Underscore Warmup I: omit The omit function takes in a word and a letter and returns the same word with every occurence of the letter omitted (left out).
Draw the whole scene by using helper functions to draw the different parts. At first you can just put all of the images above each other; later you can change the placement so it looks the way you prefer. Draw the gallows based on how many wrong answers. Draw the mistaken letters. Draw the word with underscores for letters that are not guessed. The key step is to draw the word with underscores for the letters missed.