Skip to content

A minimalistic python based CLI game to pass time test your luck - Terminal-cricket

License

Notifications You must be signed in to change notification settings

EzazAA/terminal-cricket

Repository files navigation


Command Prompt 28-09-2024 9 01 00 PM

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

Installation

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

  1. PyPi package :
    pip install terminal-cricket

Running the Game

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!

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.

Contributing to Terminal Cricket

We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your help is greatly appreciated.

How to Contribute

  1. 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.
  2. Clone Your Fork

    • Clone your forked repository to your local machine using the following command:
      git clone https://github.com/EzazAA/terminal_cricket.git
  3. Create a Branch

    • Create a new branch for your feature or bug fix:
      git checkout -b my-feature-branch
  4. Make Your Changes

    • Make the necessary changes in your local repository. Ensure that you follow the project's coding style and conventions.
  5. 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.
  6. 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"
  7. Push to Your Fork

    • Push your changes to your forked repository:
      git push origin my-feature-branch
  8. 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.

Contribution Guidelines

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

License

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

Author

Ezaz Alam Ahmed
GitHub