A fun and interactive number-guessing game built with HTML, CSS, and JavaScript.
Try to guess the secret number between 1 and 20 while keeping your score high.
The game also tracks your highscore so you can challenge yourself again and again!
- 🔢 Guess a random number between 1 and 20
- 🎮 Real-time feedback (
Too High!,Too Low!,Correct!) - 💯 Score decreases with each wrong attempt
- 🥇 Highscore tracking for replayability
- 🎨 Simple and responsive UI
📦 guess-my-number
├── .prettierrc # Prettier Configuration
├── index.html # Main HTML file
├── style.css # Styling (CSS)
└── script.js # Game logic (JavaScript)
- Enter a number between 1 and 20 in the input box.
- Click Check! to see if your guess is correct.
- The game will give hints:
- 📉 "Too Low!"
- 📈 "Too High!"
- ✅ "Correct Number!"
- Each wrong guess reduces your score.
- Beat your highscore by guessing the number with fewer tries!
- Click Again! to restart the game anytime.
You can run the game locally in 2 easy steps:
-
Clone the repo
git clone https://github.com/khalidrahmanhanify/guess-my-number-v2.git cd guess-my-number -
Open in Browser
- Just open the
index.htmlfile in your favorite browser.
- Just open the
If deployed (e.g., GitHub Pages, Netlify, Vercel), add the link here: 👉 Play Guess My Number!
Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. You’re free to use, modify, and distribute it.
Khalid Rahman Hanify
