Live demo hosted on Nest at hangman.epin.to.
I made lots of progress, as you can probably tell with the amount of time it took. I added functionality for guessing entire words, which took about half of my four logged hours. Also, when the word is guessed correctly, the sprite changes to the man falling off of the gallows and saying ‘thanks’.
To guess entire words, you put an exclamation mark at the beginning of your answer. Otherwise, only single letters are accepted. For example, to guess ‘stardance’ all at once rather than one letter at a time, you would enter ‘!stardance’. If a word guess is incorrect, the counter for tries left goes down one, just like it would for guessing an incorrect letter.
I also updated some of the user prompts to make them more clear, as well as printing out all already guessed answers (letters and words) after any letter input (correct or incorrect) or incorrect word guesses so that the player can better guess correct words/letters.
The reason that this project, despite its apparent simplicity is taking so long is the little features. For example, I added different messages based on different conditions (Have letters and/or words been guessed? If only one has, change the already guessed printed message to match.)
TODO: Add the ability to turn off the counter so that the game can be played without a guess limit.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.