For this assignment, you will build a game of snowman that lets you play in the terminal!
- Fork the assignment repo
- Clone your fork to your machine
cd
to the cloned directory and runnpm install
- Create a
.gitignore
file - Inside .gitignore, write
node_modules
- Write your code in
snowman.js
- Complete the project
- Commit and push your changes to your fork
- Submit a Pull Request back to the assignment repo
- Paste a link to of your Fork on Canvas and submit
- Complete all the User stories listed below
- For the "stats" like number of remaining guesses and previously guessed letters, use one object rather than several global variables.
Copy the user stories from the Trello board here into your own board.
- The computer should pick a word at random
- The user should see a number of
_
characters equal to the number of letters in the word (ex. A _ _ L E, for apple)
- Handle invalid guesses by displaying a message and having the user enter a different guess. Invalid guesses don't count against the guess count.
- After each guess, the user should see the new updated word, replacing all
_
with letters they have guessed - After each guess, the user should see the letters they have guessed already
- After each incorrect guess, the number of guesses should decrease.
- After each correct guess, the number of guesses should stay the same.
- At the beginning of the game, the number of guesses remaining should be visible
- After each guess, the updated number of guesses should be visible
- The game should continue until the user has won or lost
- Once the full word is guessed, the game should display how many guesses it took and display a victory message
- If the user runs out of guesses, the full word should be revealed and the game should display a defeat message