Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Guessing Game

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.

Features

  • 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.

Prerequisites

  • Python 3.x
  • No additional packages are required.

How to Run

  1. Clone or download the repository.
  2. Open a terminal or command prompt.
  3. Navigate to the project directory.
  4. Run the following command to start the game:
  5. Follow the on-screen instructions to play.

How to Play

  1. Choose a difficulty level: easy, medium, or hard.
  2. Attempt to guess the correct number within the allowed tries.
  3. The game provides feedback on each guess: "Try higher" or "Try lower."
  4. When you guess correctly or run out of tries, the game ends.
  5. Your score (number of attempts) is added to the leaderboard if you guess right.
  6. After the game, replay or exit based on your preference.

Leaderboard

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.

Customization

  • Modify the difficulty_to_attempts method in the GuessingGame class to adjust attempts for each level.
  • Feel free to customize the game's logic and appearance.

Author

Charlie Nourrcier

About

A simple number guessing game in Python

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages