A fun and interactive Odd-Even cricket game where you play against the computer.
Project description
Odd Even Cricket Game
Odd Even Cricket is a fun and simple Python game where you play a virtual game of cricket against the computer. The game involves choosing between "Odd" or "Even" and then picking a number between 1 and 10. The computer also picks a number, and the game progresses based on the outcome.
Features
- Toss simulation with odd/even choice.
- Batting and bowling phases for both player and computer.
- Dynamic scoring with random number generation.
- Immediate game end when the target is reached.
- Option to replay the game after it ends.
Installation
To install the Odd Even Cricket Game, simply use pip:
pip install OddEvenGame
How to Use
After installation, you can start playing the game by importing the package and calling the start()
function.
Example
import oddevengame
oddevengame.start()
Game Flow
- Toss: Choose "Odd" or "Even" and pick a number between 1 and 10. The computer does the same, and the sum determines the winner of the toss.
- Batting/Bowling: Depending on the toss result, either you or the computer will bat first. The game will then simulate each inning, with the goal being to outscore the opponent.
- Winning: The game automatically ends when one player surpasses the other's score, and a winner is declared.
- Replay Option: After the game ends, you will be asked if you want to play again.
Requirements
- Python 3.8 or higher
License
This project is licensed under the MIT License.
Author
Developed by Siddharth Yadav.
Links
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
oddevengame-0.0.15.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for OddEvenGame-0.0.15-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d888ef6419732c0356193b154c7934556b9c748c0454608a7f5ca90e203aeb74 |
|
MD5 | b5f02684c374683acffe7d62dc9d4cf7 |
|
BLAKE2b-256 | 21f580ce29824ab022837b0c0921c8a95a79ef235cc68c58f980e92c7e8e8ff4 |