Skip to content

๐ŸŽฎ 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!

Notifications You must be signed in to change notification settings

khalidrahmanhanify/guess-my-number-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

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