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:
-
Clone the repository or download the game files:
git clone https://github.com/ezazaa/terminal-cricket.git
-
Navigate to the project directory:
cd terminal-cricket
-
Install the required dependencies:
pip install -r requirements.txt
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3bcd61c02e4f4eed745c7a87bdd6ec9dfac4df2fbf62cd74e5cd112b541c0be
|
|
| MD5 |
44539965e28212ae5724fbebc8423447
|
|
| BLAKE2b-256 |
639bb359254c71fa9666026333f7775975c08ced4ff52cac75df8095baf2600c
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44ff08751299b46a756a7c8a146b5cf65b244f63bd42a6272054dd8f58b18346
|
|
| MD5 |
36ede8765b07bbd2a1a3808c20432cc2
|
|
| BLAKE2b-256 |
f9da7190a39b3281faa26c1a8c18e581f2df554f93d31d136f4e4c6b415f5877
|