A sophisticated cricket match simulator built in Python that brings the excitement of cricket to your terminal. Experience realistic match progression, detailed player statistics, and dynamic gameplay mechanics.
- 🎯 Complete match simulation with two innings
- 📊 Realistic player stats and performance modeling
- 🏟️ Multiple field setting options
- ⚡ Powerplay implementation
- 📝 Ball-by-ball commentary
- 💾 Match statistics export (JSON/CSV)
- 🎮 Various batting shots and bowling styles
from cricket_simulator import play_match
# Define team data
team1_data = [
{"name": "Player1", "batting": 85, "bowling": 30, "role": "Batsman"},
# Add more players...
]
# Start match
play_match(team1_data, team2_data, overs=20)
git clone https://github.com/akshdeepsingh7/cricket-simulator.git
cd cricket-simulator
python main.py
- Batting Skill:
1-100
- Bowling Skill:
1-100
- Roles:
Batsman
Bowler
All-rounder
- 🛡️ Defensive
- ⚔️ Attacking
- ⚖️ Balanced
{
"match_id": "20241129_121530",
"toss_winner": "Team 1",
"result": "Team 1 wins by 25 runs"
}
Match ID,Innings,Team,Player,Runs,Balls,Strike Rate
20241129_121530,first_innings,Team 1,Player1,45,30,150.0
- 🛡️ Defensive Block
- 🚀 Cover Drive
- ⚡ Square Cut
- 💥 Pull Shot
- ➡️ Straight Drive
- 🌟 Lofted Shot
- 📐 Edge
- ⚡ Fast Pace
- 🎯 Yorker
- 💨 Bouncer
- 🌀 Off Spin
- 🔄 Leg Spin
- Python 3.6+
- Standard Library Only
- 🏏 International Cricket Council for game rules
- 🎮 Cricket gaming community