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
Built Distribution
File details
Details for the file oddevengame-0.0.15.tar.gz
.
File metadata
- Download URL: oddevengame-0.0.15.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36f8852a8b7601f358bcec4e3127f4121ca82e784ad5ec6ff7bcbb01f7612fdc |
|
MD5 | bc0274b2fa08b7423127b0c631ea4ff3 |
|
BLAKE2b-256 | f65672e27ad178b22c7bf1addef48d531241726b316d52fc4fd8b038dcc0550a |
File details
Details for the file OddEvenGame-0.0.15-py2.py3-none-any.whl
.
File metadata
- Download URL: OddEvenGame-0.0.15-py2.py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d888ef6419732c0356193b154c7934556b9c748c0454608a7f5ca90e203aeb74 |
|
MD5 | b5f02684c374683acffe7d62dc9d4cf7 |
|
BLAKE2b-256 | 21f580ce29824ab022837b0c0921c8a95a79ef235cc68c58f980e92c7e8e8ff4 |