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!
- 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
).
- Python 3.6 or higher
Follow these steps to install and play the game on your local machine:
- PyPi package :
pip install terminal-cricket
Once the game is installed, you can run it using the following command in your terminal:
terminal-cricket
Follow the on-screen instructions to start playing!
-
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.
We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your help is greatly appreciated.
-
Fork the Repository
- Click on the Fork button at the top right corner of this repository to create a copy of the project in your own GitHub account.
-
Clone Your Fork
- Clone your forked repository to your local machine using the following command:
git clone https://github.com/EzazAA/terminal_cricket.git
- Clone your forked repository to your local machine using the following command:
-
Create a Branch
- Create a new branch for your feature or bug fix:
git checkout -b my-feature-branch
- Create a new branch for your feature or bug fix:
-
Make Your Changes
- Make the necessary changes in your local repository. Ensure that you follow the project's coding style and conventions.
-
Test Your Changes
- Run the game and test your changes to ensure everything works as expected. If you've added new features, make sure to write tests for them.
-
Commit Your Changes
- Add your changes to the staging area and commit them with a descriptive message:
git add . git commit -m "Add my new feature"
- Add your changes to the staging area and commit them with a descriptive message:
-
Push to Your Fork
- Push your changes to your forked repository:
git push origin my-feature-branch
- Push your changes to your forked repository:
-
Create a Pull Request
- Go to the original repository where you want to contribute.
- Click on the Pull Requests tab and then click New Pull Request.
- Select your branch and submit the pull request. Provide a clear description of the changes you've made.
- Code Style: Please ensure your code follows the existing code style and conventions used in the project.
- Documentation: If you add new features or make significant changes, please update the documentation accordingly.
- Issues: If you find bugs or have suggestions for improvements, please open an issue in the repository.
For more information, please refer to the project's main README.
This project is licensed under the MIT License - see the LICENSE file for more details.
Ezaz Alam Ahmed
GitHub