number-guessing-game_by_ehtesham
v1.0.0
Published
This project is a command-line interface (CLI) based number guessing game developed using TypeScript and the inquirer library. The game generates a random number between 1 and 10, and the player's objective is to guess the correct number.
Downloads
3
Readme
Number Guessing Game
This is a simple command-line program built with Node.js that allows the user to guess a randomly generated number between 1 and 10.
Instructions
Ensure you have Node.js installed on your machine.
Clone or download this repository to your local machine.
Open your terminal or command prompt and navigate to the directory where you saved the files.
Install the required npm packages using the following command:
npm install
Run the program using:
./index.js
Follow the prompts to guess the randomly generated number.
Program Workflow
The program generates a random number between 1 and 10.
You will be prompted to enter your guess for this number.
The program will compare your guess with the generated number.
If your guess matches the generated number, you win! Otherwise, the correct number will be revealed.
Dependencies
- inquirer: Used to create interactive command-line prompts.
Usage
Feel free to use and modify this program for learning or entertainment purposes. Experiment with different ranges of numbers or additional features to enhance the game.
Enjoy guessing and have fun! 😊