1.0.0 • Published 7 months ago

@azfarmasood21/cli-project-01-number-guessing-game-01 v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Number Guessing Game:

Discription:

Welcome to the Number Guessing Game! This is a simple command-line game built with Node.js that challenges you to guess a random number within a given range.

Table of Contents:

How to Play:

  1. Start the Game: When you start the game, you'll see a colorful welcome message and game title.

  2. Choose Difficulty: Choose your preferred difficulty level:

    • Easy
    • Medium
    • Hard
  3. Guess the Number: Once you've selected a difficulty level, the game will generate a random number within a predefined range, and you'll need to guess that number.

  4. Enter Your Guess: Enter your first guess when prompted.

  5. Receive Feedback:

    • The game will provide feedback on your guess:
    • If your guess is too low, it will tell you and show the number of remaining attempts.
    • If your guess is too high, it will also inform you of that and display the remaining attempts.
    • If you guess correctly, you win the game!
  6. Keep Guessing: Keep guessing until you either find the correct number or run out of attempts.

  7. Game Over: If you win, the game will display a victory message. If you lose, it will reveal the correct number.

  8. Restart or Exit: You can choose to restart the game or exit after each round.

Game Rules:

  • Easy: You have 20 attempts to guess a number between 1 and 40.
  • Medium: You have 15 attempts to guess a number between 1 and 60.
  • Hard: You have 10 attempts to guess a number between 1 and 100.

Installation:

To play this game, you'll need to have Node.js installed on your computer. If you don't have it, you can download it from the official [Node.js website](https://nodejs.org/).

npm Package:

  1. npm i @azfarmasood21/cli-project-01-number-guessing-game-01

npx Package:

  1.  npx @azfarmasood21/cli-project-01-number-guessing-game-01

Author:

This Number Guessing Game was created by Hafiz Azfar Masood.