Hand Cricket Game
Overview
This is a simple command-line-based Hand Cricket game implemented in Python. It allows you to play cricket against a computer opponent. You can either choose to bat first or bowl first and select the difficulty level of the computer opponent.
Features
- User-friendly command-line interface.
- Choose the number of overs (1-10) for the game.
- Choose to bat or bowl first.
- Three difficulty levels for the computer opponent (Easy, Medium, Hard).
- Realistic cricket scoring and gameplay.
Example
Welcome Hand Cricket
You will be playing against another player
Enter the number of overs (1-10): 2
Toss time!
Choose heads (1) or tails (2): 1
It's Heads!
Player 1 won the toss!
Player 1, choose 1 to bat first, 2 to bowl first: 1
Select difficulty level (1-Easy, 2-Medium, 3-Hard): 1
Match Summary
=============
Overs: 2
Over 1, Player 1: 10 wickets left, Player 2: 10 wickets left
Player's turn - Batting
Over 1, Ball 1: Enter your shot (1-6): 4
You chose 4, Opponent chose 2
Player's score is 4
...
Match Result
============
Player 1's score = 28
Player 2's score = 19
Player 1 won
Thank you for playing and have a good day :)
Installation
Clone this repository to your local machine:
git clone https://github.com/your-username/hand-cricket-game.gitNavigate to the project directory:
cd hand-cricket-game
Usage
Open your terminal or command prompt.
Navigate to the project directory.
Run the game using Python:
python main.pyFollow the on-screen instructions to play the game.
Game Rules
- You can choose to bat or bowl first.
- While batting, enter your shot choice (1-6) for each ball.
- While bowling, enter your delivery choice (1-6) for each ball.
- If your choice matches the computer's, you are out.
- Score as many runs as you can while batting.
- Try to dismiss the computer's batsmen while bowling.
- The game ends after the specified number of overs.
Contributing
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the project.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your fork.
- Submit a pull request to the main repository.
Acknowledgments
- This game was inspired by the popular hand cricket game played by many cricket enthusiasts.
- Special thanks to the Python community for providing helpful libraries and resources.