https://github.com/hariprasath-v/advanced_cricket_tournament_simulation
Simulate cricket matches between two teams with this command-line program.
https://github.com/hariprasath-v/advanced_cricket_tournament_simulation
cricket cricketgame cricketsimulation ipython matplotlib numpy pandas python random seaborn
Last synced: about 2 months ago
JSON representation
Simulate cricket matches between two teams with this command-line program.
- Host: GitHub
- URL: https://github.com/hariprasath-v/advanced_cricket_tournament_simulation
- Owner: hariprasath-v
- License: apache-2.0
- Created: 2023-08-20T07:45:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-12T04:04:13.000Z (over 1 year ago)
- Last Synced: 2025-03-13T00:17:29.606Z (about 2 months ago)
- Topics: cricket, cricketgame, cricketsimulation, ipython, matplotlib, numpy, pandas, python, random, seaborn
- Language: Python
- Homepage:
- Size: 517 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advanced_Cricket_Tournament_Simulation
Simulate cricket matches between two teams with this command-line program.
## Overview
The Cricket Simulation Program allows you to simulate cricket matches and analyze player performances. The simulation program consists of the following classes.
- Players: This class gathers player information and presents it in a structured dataframe format.
- Teams: Utilize the Teams class to designate team captains, arrange batting orders, and establish the list of bowlers. It leverages player information to make informed decisions.
- Umpire: The Umpire class plays a pivotal role in predicting ball outcomes, enhancing the simulation's authenticity.
- Commentator: Enjoy dynamic match commentary throughout the simulation with the Commentator class, adding a lively aspect to the experience.
- Match: The Match class encapsulates the core simulation, replicating the dynamics of a cricket game.## Features
- Simulate matches between custom-named teams.
- Set the number of overs for each match.
- Display detailed statistics for each player, including runs scored, wickets taken, and more.## Installation
1. Clone the repository
```python
git clone https://github.com/hariprasath-v/Advanced_Cricket_Tournament_Simulation.git
```
2. Navigate to the cloned repo directory
```python
cd Advanced_Cricket_Tournament_Simulation
```
3. Install dependencies
```python
pip install -r requirements.txt
```## Usage
run the play.py (The player's information can be changed in this file)The simulation proceeds through the following stages:
1. Player Information Collection
2. Captain, Batter, and Bowler Selection
3. Coin Flip to Determine Play Choice
4. First Innings Simulation
5. Second Innings Simulation
6. Post-Match SummaryAfter the simulation, the program generates the following files within the folder named by the date of the simulation and both team names:
- Innings Scorecard (Image Format)
- Ball-by-Ball Summary (DataFrame Format)
- Match Result (DataFrame Format)
- Team's Score Comparison Chart (Image Format)### Demo simulation
Sample Scorecard
Sample Score Comparison
