https://github.com/adityadhiman-in/number_guessing_game
This is a beautiful Number Guessing Game built with HTML, CSS, and JavaScript. The game generates a random number between 1 and 100, and the player has to guess the correct number from four given options. The game shows feedback if the guess is correct or incorrect and provides an option to play again after a correct guess.
https://github.com/adityadhiman-in/number_guessing_game
css games html javascript javascript-game
Last synced: 2 months ago
JSON representation
This is a beautiful Number Guessing Game built with HTML, CSS, and JavaScript. The game generates a random number between 1 and 100, and the player has to guess the correct number from four given options. The game shows feedback if the guess is correct or incorrect and provides an option to play again after a correct guess.
- Host: GitHub
- URL: https://github.com/adityadhiman-in/number_guessing_game
- Owner: adityadhiman-in
- Created: 2024-08-13T10:37:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-14T09:32:10.000Z (almost 2 years ago)
- Last Synced: 2025-02-14T05:19:47.102Z (over 1 year ago)
- Topics: css, games, html, javascript, javascript-game
- Language: JavaScript
- Homepage:
- Size: 63.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Number Guessing Game

This is a simple Number Guessing Game built with HTML, CSS, and JavaScript. The game generates a random number between 1 and 100, and the player has to guess the correct number from four given options. The game shows feedback if the guess is correct or incorrect and provides an option to play again after a correct guess.
## Features
- **Start Game**: Click the `Start Game` button to begin.
- **Random Number Generation**: A random number between 1 and 100 is generated for each round.
- **Multiple Choice Options**: The game displays four number options, one of which is the correct answer.
- **Feedback**: Shows a message ("Hurray! Correct Guess" or "Oops! Try Again") based on the player's guess.
- **Play Again**: After guessing correctly, the player can click the `Play Again` button to restart the game with new random numbers.
## Technologies Used
- **HTML5**: Structure of the game.
- **CSS3**: Styling the UI.
- **JavaScript**: Game logic, random number generation, and user interaction.
## How to Run the Game
1. Clone the repository or download the code files.
2. Open the `index.html` file in your browser.
3. Click the `Start Game` button to begin playing.
## Game Flow
1. **Start the Game**: The player clicks on the `Start Game` button to begin the game.
2. **Guess the Number**: Four random numbers are displayed as buttons. The player must click one to make a guess.
3. **Feedback**: If the guess is correct, the player sees a success message, and the option to play again. If incorrect, the player is prompted to try again.
4. **Play Again**: Once the correct number is guessed, the `Play Again` button appears, allowing the player to start over with new numbers.
## Contact
Feel free to reach out if you have any questions or suggestions!
- [Website](https://adityadhiman-in)
- [GitHub](https://github.com/adityadhiman-in)
- [LinkedIn](https://www.linkedin.com/in/adityadhiman-in)
Made with ❤️ by Aditya Dhiman