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.1.0.tar.gz (3.6 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.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: terminal_cricket-1.1.0.tar.gz
  • Upload date:
  • Size: 3.6 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.1.0.tar.gz
Algorithm Hash digest
SHA256 0ee39cbc2b52ed3090924f7492c415cc8618f9bf7d12e1c2eab6902754667dc5
MD5 358190c79788b40efe863ec8ab3a3ae0
BLAKE2b-256 d9a414cd4f0214191e4a07664179a68db6063b3eea7c2a4b75962c1febe38236

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for terminal_cricket-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a8ce3dd7d380dfe6d452464f7a2e89c7f0257e42dae5ad62600bba9217323db
MD5 842261ba25a43e89a9fa4ba461b962b3
BLAKE2b-256 adb0f595ab6d9aaa35a5503e08134e6d62ac2126348b79c958bf0f6d3df96442

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