MysteryNum is a number guessing game built using vanilla JavaScript, HTML and CSS.
- Guess the randomly generated secret number.
- The objective is to find the correct number before the computer finds it.
The guesses made by the computer are not random
but sound and smart.
To play the game, you need a web browser with JavaScript support.
-
Clone the repository or download the source code.
-
Open a terminal or command prompt and navigate to the project directory.
-
Install the dependencies by running the following command:
npm install
-
Start the server:
npm run devstart
-
Open a web browser and visit
http://localhost:3000
to play the game.
Alternatively, you can play the game online by visiting the MysteryNum Game Website.
The project has the following file structure:
/
├── public/
│ ├── index.html
│ ├── MysteryNum.js
│ └── style.css
├── assets/
│ ├── background.jpg
│ ├── computer.png
│ └── human.png
├── server.js
└── package.json
- When you start the game, a secret number between a specified range will be generated.
- Enter your guess in the input field provided and click the "Guess" button.
- The game will provide feedback whether your guess is too high or too low.
- Keep guessing until you find the correct number or run out of attempts.
- The game will end and display the result (win or lose) along with the secret number.
- Responsive UI: The game interface is designed to work well on both desktop and mobile devices.
Contributions to the MysteryNum game are welcome. If you find any bugs, have suggestions, or want to add new features, please open an issue or submit a pull request on the GitHub repository.
This project is licensed under the GNU General Public License. See the LICENSE file for more details.