GitHub - khalidrahmanhanify/guess-my-number-v2: 🎮 A simple "Guess My Number!" game built with HTML, CSS, and JavaScript. Test your luck and logic by guessing a random number between 1 and 20, with scoring and highscore tracking! · GitHub
Skip to content

khalidrahmanhanify/guess-my-number-v2

Folders and files

Repository files navigation

🎯 Guess My Number!

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!


🚀 Features

  • 🔢 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

📂 Project Structure


📦 guess-my-number
├── .prettierrc  # Prettier Configuration
├── index.html   # Main HTML file
├── style.css    # Styling (CSS)
└── script.js    # Game logic (JavaScript)


🕹️ How to Play

  1. Enter a number between 1 and 20 in the input box.
  2. Click Check! to see if your guess is correct.
  3. The game will give hints:
    • 📉 "Too Low!"
    • 📈 "Too High!"
    • ✅ "Correct Number!"
  4. Each wrong guess reduces your score.
  5. Beat your highscore by guessing the number with fewer tries!
  6. Click Again! to restart the game anytime.

🔧 Installation & Usage

You can run the game locally in 2 easy steps:

  1. Clone the repo

    git clone https://github.com/khalidrahmanhanify/guess-my-number-v2.git
    cd guess-my-number
  2. Open in Browser

    • Just open the index.html file in your favorite browser.

🌐 Live Demo

If deployed (e.g., GitHub Pages, Netlify, Vercel), add the link here: 👉 Play Guess My Number!


🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request.


📜 License

This project is licensed under the MIT License. You’re free to use, modify, and distribute it.


👨‍💻 Author

Khalid Rahman Hanify

About

🎮 A simple "Guess My Number!" game built with HTML, CSS, and JavaScript. Test your luck and logic by guessing a random number between 1 and 20, with scoring and highscore tracking!

Topics

Resources

Stars

Watchers

Forks

Contributors