constructor-word-guess-2

1.0.2 • Public • Published

Constructor Word Guess 2

Welcome to Constructor Word Guess 2. Constructor Word Guess 2 is a colorful CLI-based word guessing game. You can use this to easily create a word guessing game with whatever words you choose.

Getting Started

To install on your local machine, run the following in your terminal:

$ npm install constructor-word-guess-2

Create a .js file and use the following

const wordGuess = require('constructor-word-guess-2');

Quick Start

Copy and paste the following into your index.js file:

const wordGuess = require('constructor-word-guess-2');
let array = ['stringone', 'stringtwo', 'stringthree', 'stringfour'];
 
wordGuess(array);

To start the game, you must pass an array as an argument in your function. For example:

let array = ['stringone', 'stringtwo', 'stringthree', 'stringfour'];
 
wordGuess(array);

Things to note

Arrays may only consist of alphabetic strings. Numbers, special characters, or spaces in a string will not allow the application to function properly.

Game Play

Users will first be greeted with an option to play a new game or exit the game.

Welcome

Upon selecting "New Game" users will start a new game and can begin guessing letters.

Users may only enter one lowercase letter. If a user enters numbers, special characters, uppercase letters or multiple letters they will see an error message instructing them of their mistake. validation

Additionally, users will be notified if they guess the same letter more than once. Duplicate_Letters

When a user guesses all the letters of a word correctly, they will be notified that they have one and will be asked if they want to start a new game or exit. Win

If a users guesses all of the words correctly, they will be shown a message saying they have guesed all the words correctly and the application will exit back to the terminal. Win_Game

Should a user make 10 mistakes when guessing letters, they will lose the game and be offered the opportunity to either start a new game or exit. Lose_Round

Exiting the game will take the user back to the terminal. Exit_Game

Below are some examples of what typical game play may look like.

winning

new_game

NPMs used

Package Sidebar

Install

npm i constructor-word-guess-2

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

6.05 MB

Total Files

14

Last publish

Collaborators

  • heincm