Word Guess command-line game using constructor functions.
- Clone down repo.
- Run command 'npm install' in Terminal or GitBash
- Run command 'node App.js'.
node App.js
- Starts the game.
- Node js
{
"inquirer": "^6.2.1",
}
-
Letter.js:
- Contains a constructor, Letter. This constructor should be able to either display an underlying character or a blank placeholder (such as an underscore), depending on whether or not the user has guessed the letter.
-
Word.js:
- Contains a constructor, Word that depends on the Letter constructor. This is used to create an object representing the current word the user is attempting to guess.
-
App.js:
- The file containing the logic for the course of the game, which depends on
Word.js
and:
- The file containing the logic for the course of the game, which depends on
-
Randomly selects a word and uses the
Word
constructor to store it -
Prompts the user for each guess and keeps track of the user's remaining guesses