The Guessing Game is a simple command-line game implemented in Python. Players attempt to guess a randomly generated target number within a specified number of attempts. The game offers different difficulty levels and maintains a leaderboard to track players' scores.
- Choose from three difficulty levels: easy, medium, and hard.
- Guess a number between 1 and 100 within the specified attempts.
- Display a leaderboard showing players and their best scores.
- Option to replay the game or exit after each session.
- Python 3.x
- No additional packages are required.
- Clone or download the repository.
- Open a terminal or command prompt.
- Navigate to the project directory.
- Run the following command to start the game:
- Follow the on-screen instructions to play.
- Choose a difficulty level: easy, medium, or hard.
- Attempt to guess the correct number within the allowed tries.
- The game provides feedback on each guess: "Try higher" or "Try lower."
- When you guess correctly or run out of tries, the game ends.
- Your score (number of attempts) is added to the leaderboard if you guess right.
- After the game, replay or exit based on your preference.
The game maintains a leaderboard that tracks players' scores. Your best scores are saved under your name. View the leaderboard after each game to compare with others.
- Modify the
difficulty_to_attemptsmethod in theGuessingGameclass to adjust attempts for each level. - Feel free to customize the game's logic and appearance.
Charlie Nourrcier