Hangman is a game where a user must solve for some hidden word by guessing letters that may be present. If the user guesses a correct letter, it appears in string of letter placeholders; if the user guesses incorrectly, an additional portion of a gallows is drawn. The user wins when all letters are guessed or loses after some number of guesses.
- Generate word from preset list Example input: Example output: "dog"
- Test if word contains guessed letter Example input: "o" Example output: true
- Update placeholder string and guessed letters Example input: "o" Example output: "-o-"
- update guessed letters Example input: "o"; "p" Example output: "op"
- Update placeholder string for multiple occurrences of guessed letter Example input (for rare): "r" Example output: "r-r-"
[KEEP TRACK OF WRONG GUESSES, GAME LOOP, WIN/LOSE CONDITION, GALLOWS]
[CLEAN INPUT]
- Update and render gallows
Zenscape is viewable online at http://zenscape.us
To view the source code:
- visit https://github.com/rhofvendahl/Zenscape
- clone or download
- open index.html in Google Chrome
Zenscape was created entirely with html and css styling, as well as the JQuery library.
This software is licensed under the MIT license.