Skip to main content

A simple terminal game depicting cricket

Project description

Here's a clean, well-structured version of your README.md file for your cricket terminal game:


Cricket Terminal Game

A simple terminal-based cricket game where you can bat and bowl against the computer. Challenge the CPU in this fun, quick game of hand-cricket right from your terminal!

Features

  • Play a text-based cricket game in your terminal.
  • Choose between batting and bowling.
  • Randomized decisions by the computer to simulate a real cricket match.
  • Colorful output to enhance the gaming experience (using colorama).

Requirements

  • Python 3.6 or higher
  • colorama library (for colorful terminal outputs)

Installation

Follow these steps to install and play the game on your local machine:

  1. Clone the repository or download the game files:

    git clone https://github.com/ezazaa/terminal-cricket.git
    
  2. Navigate to the project directory:

    cd terminal-cricket
    
  3. Install the required dependencies:

    pip install -r requirements.txt
    
  4. Install the game (package it locally):

    pip install .
    

Running the Game

Once the game is installed, you can run it using the following command in your terminal:

cricket

Follow the on-screen instructions to start playing!

How to Play

  • Batting:

    • You'll be prompted to choose a number between 1 and 6 (like cricket runs).
    • The computer will randomly choose a number.
    • If both numbers match, you're out. Otherwise, you score runs equal to your choice.
  • Bowling:

    • You choose a number between 1 and 6 to bowl.
    • The computer will randomly choose a number for its batting.
    • If both numbers match, the computer is out. Otherwise, the computer scores.

After both batting and bowling, the game will calculate the final score, and the winner will be announced.

Example Gameplay

Choose batting(1) or bowling(2): 1
=============================================================
Now your batting
Choose any number between 1 and 6: 3
You batted for 3 and computer bowled 2
You got 3 runs
Your current score: 3
...

License

This project is licensed under the MIT License - see the LICENSE file for more details.

Author

Ezaz Alam Ahmed
GitHub


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terminal_cricket-1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terminal_cricket-1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file terminal_cricket-1.0.tar.gz.

File metadata

  • Download URL: terminal_cricket-1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for terminal_cricket-1.0.tar.gz
Algorithm Hash digest
SHA256 d3bcd61c02e4f4eed745c7a87bdd6ec9dfac4df2fbf62cd74e5cd112b541c0be
MD5 44539965e28212ae5724fbebc8423447
BLAKE2b-256 639bb359254c71fa9666026333f7775975c08ced4ff52cac75df8095baf2600c

See more details on using hashes here.

File details

Details for the file terminal_cricket-1.0-py3-none-any.whl.

File metadata

  • Download URL: terminal_cricket-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for terminal_cricket-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44ff08751299b46a756a7c8a146b5cf65b244f63bd42a6272054dd8f58b18346
MD5 36ede8765b07bbd2a1a3808c20432cc2
BLAKE2b-256 f9da7190a39b3281faa26c1a8c18e581f2df554f93d31d136f4e4c6b415f5877

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page