A simple and interactive number guessing game where players try to guess a randomly generated number between 1 and 100. The game offers two difficulty levels, with a different number of attempts to guess the correct number.
Live Link (Fully Responsive) : Check out the live solution from Netlify here
- Features
- Getting Started
- Game Rules
- Technologies Used
- File Structure
- How to Play
- Customization
- Contributing
- License
- Two difficulty levels: Easy (10 attempts) and Hard (5 attempts).
- Real-time feedback: Players receive hints whether their guess is too high or too low.
- Game statistics: Displays the number of attempts left and previous guesses.
- Responsive design: Works well on both mobile and desktop devices.
- Simple user interface: Easy to use and understand for all age groups.
To run this game, all you need is a modern web browser.
- Clone the repository or download the ZIP file.
git clone https://github.com/yourusername/guess-the-number-game.git
- Navigate to the project directory and open the
index.html
file in your browser.
- Choose a difficulty level: Easy or Hard.
- Easy Mode: You have 10 attempts to guess the number.
- Hard Mode: You have 5 attempts to guess the number.
- The computer randomly selects a number between 1 and 100.
- Enter your guess in the input box and click "Enter".
- The game will inform you if your guess is high, low, or correct.
- The game ends when you guess the correct number or run out of attempts.
- HTML: Structure of the web page.
- CSS: Styling for the game interface.
- JavaScript: Game logic and interactivity.
Guess-the-Number-Game/
├── index.html # Main HTML file for the game
├── style.css # Stylesheet for styling the game
├── index.js # JavaScript file for game logic
└── img/ # Images used in the game
└── game.png # Game-related image (illustrative)
- Open the
index.html
file in your web browser. - Select the game difficulty (Easy or Hard).
- Guess the number by entering a value between 1 and 100.
- Follow the hints to adjust your next guess.
- Win by guessing the correct number within the allowed number of attempts.
Include screenshots of different states (e.g., game home page, game interface, correct input and game over message) to give users a visual understanding of the game's functionality.
Contributions are welcome! If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or fix:
git checkout -b feature-name
- Make your changes and commit them:
git commit -m "Add your message"
- Push to the branch:
git push origin feature-name
- Open a pull request describing your changes.
This project is licensed under the MIT License. See the LICENSE file for details.