Skip to main content

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

  1. 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.
  2. 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.
  3. Winning: The game automatically ends when one player surpasses the other's score, and a winner is declared.
  4. 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


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 details)

Uploaded Source

Built Distribution

OddEvenGame-0.0.15-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

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

Hashes for oddevengame-0.0.15.tar.gz
Algorithm Hash digest
SHA256 36f8852a8b7601f358bcec4e3127f4121ca82e784ad5ec6ff7bcbb01f7612fdc
MD5 bc0274b2fa08b7423127b0c631ea4ff3
BLAKE2b-256 f65672e27ad178b22c7bf1addef48d531241726b316d52fc4fd8b038dcc0550a

See more details on using hashes here.

File details

Details for the file OddEvenGame-0.0.15-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for OddEvenGame-0.0.15-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d888ef6419732c0356193b154c7934556b9c748c0454608a7f5ca90e203aeb74
MD5 b5f02684c374683acffe7d62dc9d4cf7
BLAKE2b-256 21f580ce29824ab022837b0c0921c8a95a79ef235cc68c58f980e92c7e8e8ff4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page