For today's lab you will be recreating a classic game: Hangman!
You will be working in pairs on this assignment. That means you can only use one computer to code on. This will be a great exercise in pair programming. Feel free to switch between the "Driver" and "Navigator" roles throughout the lab.
YOU MUST spend 30 minutes pseudo-coding your plan for the lab before typing out any Javascript.
Your game must...
- Render in the browser.
- Include separate HTML/CSS/Javascript files.
- We have provided you with some starter code. Feel free to make changes to it.
- Use Javascript and/or jQuery for DOM manipulation.
- Player 1 can enter a word that will be guessed during the game.
- The word is then hidden and represented by blank spaces.
- Player 2 enters a letter and clicks a button to submit their guess.
- If the letter is present, it is revealed.
- If not, the number of turns left is decremented.
- NOTE: No images are required!
Feel free to take on any/all of these!
- Show each letter as it's guessed.
- All 26 letters are shown and can be clicked on.
- When the user clicks a letter, it is grayed out and rendered unclickable for the rest of the game.
- Create a visual representation of the hangman (e.g., stick figure).
- Have the game randomly pick a word from a dictionary. This means the user would not have to submit a word at the start of the game.
- Add a timer to the game.