A simple, classic number guessing game built with HTML, CSS, and JavaScript. The objective is to guess a secret number chosen by the computer within a limited number of attempts.
This project demonstrates basic web development concepts including DOM manipulation, event handling, and simple game logic.
✨ Play the live version here! ✨ https://amirulsizan.github.io/numguess/
- Randomly generated secret number within a defined range (1-50).
- User input for guesses.
- Feedback provided for each guess ("Too high!", "Too low!").
- Limited number of attempts (7 guesses).
- Clear win/loss messages upon game completion.
- A "Play Again" button to restart the game easily.
- Basic input validation.
- Responsive layout (basic).
- Click the Live Demo link provided above.
- The game will tell you the range the secret number falls within and how many attempts you have.
- Enter your numerical guess into the input box.
- Click the "Guess" button or press the
Enterkey. - Read the feedback provided.
- Continue guessing based on the feedback until you guess the number correctly or run out of attempts.
- If you want to play again, click the "Play Again?" button.
If you want to run the game on your local machine:
- Clone the repository:
git clone [https://amirulsizan.github.io/numguess/](https://amirulsizan.github.io/numguess/)
- Navigate to the directory:
cd numguess - Open the
index.htmlfile in your preferred web browser (e.g., Chrome, Firefox, Edge).
- HTML5: For the structure and content of the web page.
- CSS3: For styling the user interface.
- JavaScript (ES6+): For game logic, DOM manipulation, and event handling.
- Add difficulty levels (e.g., Easy: 1-25, Medium: 1-50, Hard: 1-100 with fewer guesses).
- Track high scores or fewest guesses using local storage.
- Improve UI/UX with better styling or animations.
- Add hints after a certain number of incorrect guesses.
This project is open source and available under the MIT License.
This README was generated based on project details as of Thursday, May 1, 2025.
