Bit Guessing Game ๐ฎ
A simple, responsive web-based number guessing game built with HTML, CSS, and Vanilla JavaScript. The player tries to guess a randomly generated number between 1 and 50, receiving feedback on whether their guess is too high or too low.
๐ Features
Random Number Generation: A new target number (1-50) is generated every time the game starts or resets.
Real-time Feedback: Tells the user if their guess is "Too high," "Too low," or "Correct!"
Attempt Tracking: Counts how many guesses it takes to find the correct number.
Input Validation: Prevents submitting empty values or numbers outside the 1-50 range.
Responsive Design: Works on desktop and mobile devices.
Game State Management: Disables inputs upon winning to prevent further guesses until reset.
๐จ Color Scheme
The game uses a specific vibrant color palette:
Background: #667eea (Vibrant Purple)
Primary Action (Submit): #00bcd4 (Cyan)
Secondary Action (Reset): #ff6b6b (Coral Red)
Card Background: White (For contrast/readability)
๐น๏ธ How to Play
Enter a Number: Type a number between 1 and 50 in the input field.
Submit: Click the "Submit Guess" button or press the Enter key.
Read Feedback:
If the guess is wrong, the game will tell you if you are too high or too low.
If the guess is correct, a victory message appears!
Reset: Click "Reset Game" to clear your stats and start with a new number.
๐ Installation & Usage
Since this project is contained within a single file, no installation is required.
Download the index.html file.
Open the file in any modern web browser (Chrome, Firefox, Safari, Edge).
๐ ๏ธ Technologies Used
HTML5: Structure and semantics.
CSS3: Styling, flexbox layout, and responsive design.
JavaScript (ES6+): Game logic, DOM manipulation, and event handling.
๐ License
This project is open source and available for personal and educational use.