Skip to content

A simple, interactive game built with HTML, CSS, and JavaScript. Players try to guess a random number between 1 and 100 in 10 attempts. The game features a sleek dark glassmorphism theme, input validation, and saves the best score using localStorage. It’s fully responsive for mobile, tablet, and desktop devices.

Notifications You must be signed in to change notification settings

hassanasif653/js-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Guess the Number Game with Best Score

An interactive and engaging "Guess the Number" game built with HTML, CSS, and JavaScript. Players try to guess a random number between 1 and 50 within 10 attempts. The game features a sleek dark-themed glassmorphism UI design with glowing buttons and animations for an immersive experience.

Live demo

https://hassan-jjs-game.netlify.app/

Features

  • Random number between 1 and 100.
  • Input validation for valid numeric guesses only.
  • Feedback for too high, too low, or correct guesses.
  • Limited 10 attempts per game.
  • Persistent best score saved in browser localStorage.
  • Responsive and visually attractive dark theme with animations.

Technologies Used

  • HTML5 for structuring the page.
  • CSS3 with glassmorphism and neon glow effects.
  • Vanilla JavaScript for game logic and localStorage.

How to Play

  1. Enter a guess number between 1 and 100.
  2. Click "Check" to submit your guess.
  3. The game will tell you if the guess is too high or too low.
  4. Guess the correct number before running out of tries.
  5. Your best score (lowest guesses) is saved and displayed.
  6. Click "Restart" to play again.

Installation

Simply clone this repository or download the files and open the index.html file in any modern web browser.

Simply clone this repository or download the files and open the index.html file in any modern web browser.

About

A simple, interactive game built with HTML, CSS, and JavaScript. Players try to guess a random number between 1 and 100 in 10 attempts. The game features a sleek dark glassmorphism theme, input validation, and saves the best score using localStorage. It’s fully responsive for mobile, tablet, and desktop devices.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published