"Guess My Number" is a simple and fun game built with JavaScript, HTML, and CSS. The objective of the game is for the player to guess a randomly generated number within a specified range. This project demonstrates basic DOM manipulation, event handling, and styling techniques in web development.
- Random number generation
- User input validation
- Feedback on guesses (too high, too low)
- Score tracking
- Reset functionality
- Responsive design
- Technologies Used
- HTML
- CSS
- JavaScript
Link to the live demo -> https://guess-my-number-65.netlify.app/
Prerequisites To run this project locally, you need a web browser (e.g., Chrome, Firefox, Safari).
Clone the repository: bash git clone https://github.com/your-username/guess-my-number.git Navigate to the project directory: bash
cd guess-my-number Open index.html in your web browser: bash
open index.html
#How to Play
Enter your guess in the input field. Click the "Check!" button. The game will provide feedback whether your guess is too high, too low, or correct. The score decreases with each wrong guess. Click the "Again!" button to reset the game and play again.
guess-my-number/ │ ├── index.html # The main HTML file ├── styles.css # The main CSS file └── script.js # The main JavaScript file
HTML The HTML file contains the basic structure of the game, including the input field, buttons, and elements to display the feedback and score.
CSS The CSS file contains styles to make the game visually appealing. It includes layout styles, colors, fonts, and responsive design adjustments.
JavaScript The JavaScript file contains the logic of the game:
Generating a random number Handling user input Providing feedback on guesses Updating the score Resetting the game Contributing Contributions are welcome! If you have any suggestions or improvements, feel free to open an issue or submit a pull request.
Acknowledgments [Udemy, Google, gpt]