A simple and fun number guessing game written in Bash. In this game, players guess a randomly generated number within a specific range, depending on the chosen difficulty. Players will receive hints along the way, and the game tracks high scores to make things more exciting.
Follow these steps to clone the repository, run the game, and start playing:
- For https:
git clone https://github.com/ValantineSuh/number-guessing-game.git
cd number-guessing-game
- For ssh:
git clone [email protected]:ValantineSuh/number-guessing-game.git
cd number-guessing-game
chmod +x my-game.sh
./my-game.sh
- Multiple Difficulty Levels:
- Easy: Guess a number between 1 and 50 with 10 attempts.
- Medium: Guess a number between 1 and 100 with 7 attempts.
- Hard: Guess a number between 1 and 200 with 5 attempts.
- Hint System:
- After 3 incorrect guesses, the game provides a hint (even or odd).
- High Score Tracking:
- Your best score is saved during each session.
- User-Friendly Prompts:
- Clear instructions guide you through the game, ensuring a smooth experience.
====================================================
🎮 Welcome to the Number Guessing Game 🎮
====================================================
Choose a difficulty level:
1. Easy
2. Medium
3. Hard
Enter 1, 2, or 3: 2
You chose Medium. Guess a number between 1 and 100.
Enter your guess: 50
Too low! Attempts left: 6
Enter your guess: 75
Too high! Attempts left: 5
Hint: The number is odd.
Enter your guess: 67
🎉 Congratulations! You guessed the number in 4 attempts.
🏆 New High Score: 4 attempts!
- Easy: Guess a number between 1 and 50 with 10 attempts.
- Medium: Guess a number between 1 and 100 with 7 attempts.
- Hard: Guess a number between 1 and 200 with 5 attempts.
- The game will tell you if your guess is too low or too high.
- You have a limited number of attempts, so guess wisely.
- After 3 incorrect guesses, the game provides a hint: whether the number is even or odd.
- If you guess the number in fewer attempts than the previous high score, your new score becomes the High Score.
- After each game, you can choose to play again or exit.
- Add a leaderboard to store scores across multiple sessions.
- Implement multiplayer mode.
- Use colorful text output for hints and feedback.
- Add sound effects for correct guesses and game-over events.
This project is licensed under the MIT License feel free to fork, modify, and enjoy!