Guess My Number is a fun and simple web-based game where players try to guess a randomly generated number between 1 and 20. This game keeps track of the score and allows players to reset the game when they wish to try again.
- Project Description
- Project Preview
- Features
- Technologies Used
- Installation Instructions
- Usage Instructions
- License
This is a simple web-based Number Guessing Game that allows players to guess a randomly generated number between 1 and 20. The game offers features like score tracking, highscore recording, and game reset. It is built using HTML, CSS, and JavaScript, making it a great beginner-friendly project to practice these web technologies.
You can view a live demo of the project here: Guess My Number Demo
- Random Number Generation: The game generates a random number between 1 and 20 for the player to guess.
- Score Tracking: The game starts with a score of 20 and decreases with each incorrect guess.
- Highscore Tracking: Displays and updates the highscore whenever the player beats their previous best score.
- Reset Feature: The player can restart the game at any time by clicking the "Again!" button.
- Visual Feedback: The background color changes when the player guesses correctly, and feedback messages are shown for each guess (Too high, Too low, Correct).
- HTML: Provides the structure and content for the game.
- CSS: Styles the game and makes it visually appealing.
- JavaScript: Contains the logic for the game, such as generating random numbers, checking guesses, updating scores, and handling game resets.
-
Clone this repository to your local machine using the following command:
git clone https://github.com/yourusername/guess-my-number.git
-
Navigate to the project folder
cd guess-my-number
-
Open the index.html file in your preferred browser to start playing the game.
You can open it locally by simply double-clicking the index.html file, or you can serve it using a simple local server.
-
Start the Game: Open the index.html file in any modern browser to begin playing the game.
-
Make a Guess: Enter a number between 1 and 20 in the input field and click the "Check!" button.
-
View Feedback: After each guess, you'll receive feedback about whether your guess is too high, too low, or correct.
-
Reset the Game: Click the "Again!" button to restart the game and try again with a fresh random number.
This project is licensed under the MIT License. See the LICENSE file for more information.