Challenge 8: Scoring
Improve on your Hangman game by:
- Add more puzzles (minimum of 20)
- Keep track of the score (the number of puzzles the player completes).
- After the player successfully completes a puzzle, the new score should be displayed (as part of the current congratulations alert message).
- After the player dies, the contents of the "main" div should be replaced with a message telling the player their final score and the solution to the last puzzle (the one they did not solve). No alert should be used. Style #main so that the ending message looks nice.
You should also add the CSS code to ensure that none of the text or the images in the game are selectable. Use the * to apply the style to ALL elements:
This trick is useful for most web-based games you will create, including the pacman game that we already created and the platformer and space invaders game that you will be creating next.
Optional:
- Create a usedPuzzles Array to keep track of which puzzles have already been used. Use this array when creating a new puzzle to ensure that the player is not given the same puzzle twice. (see Lesson 31, step 5 to review how this is done.)
Here is an example: Play Hangman