Simulate cricket matches between two teams with this command-line program.
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.
- 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.
- Clone the repository
git clone https://github.com/hariprasath-v/Advanced_Cricket_Tournament_Simulation.git
- Navigate to the cloned repo directory
cd Advanced_Cricket_Tournament_Simulation
- Install dependencies
pip install -r requirements.txt
run the play.py (The player's information can be changed in this file)
The simulation proceeds through the following stages:
- Player Information Collection
- Captain, Batter, and Bowler Selection
- Coin Flip to Determine Play Choice
- First Innings Simulation
- Second Innings Simulation
- Post-Match Summary
After 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)