zen-cricket

byJohn Pennington

Create a Test cricket match simulator inspired by Syedur Rahman's classic cricket simulator from the early 2000s, featuring: Core Requirements Match Structure Full 5-day Test match simulation Two innings per team Overs bowled in groups of 6 balls Realistic session structure (90 overs per day: 30-30-30 split across three sessions) Follow-on rules (200+ run lead) Declaration option available to batting team Draw, win by innings, or win by runs/wickets outcomes Visual Style & Feel Text-based interface with ASCII art elements Scoreboard display showing: current score, wickets, overs, run rate, partnership Ball-by-ball commentary in classic style ("Short of a length, defended", "Full toss, SMASHED for SIX!") Match situation summary at end of each over Fall of wickets display Bowling figures table Batting scorecard with detailed statistics Batting Mechanics (Modern Scoring Rates) Test match run rates reflecting modern aggressive approach (3.2-3.8 runs per over typical) Batsman attributes: Left/Right Hand Bat, Keeper (Y/N), Average (1-99), Strike Rate (10-150) Shot types: defensive, attacking, risky Confidence system that builds with runs scored and drops after dot balls Partnerships that accelerate as both batsmen settle New batsmen start cautiously (first 20 balls have reduced scoring) Tail-enders (batting position 9-11) with significantly reduced abilities Higher boundary percentage than historical simulators (30-40% of runs from boundaries) Bowling Mechanics with Fatigue System Bowler attributes: Hand: Right/Left, Type (Fast/Fast-Medium/Medium-Fast/Medium/Leg-Spin/Off-Spin), Average (20-150), Strike-Rate (20-200) Realistic spell lengths: Fast bowlers: maximum 6-8 over spells before requiring rest Fast-medium: 8-10 over spells Spinners: 12-20 over spells (can bowl longer) Fatigue effects: Effectiveness drops 5% per over in spell after optimal length Bowling speed reduces for pace bowlers when tired Accuracy decreases (more loose deliveries) Increased chance of being hit for boundaries Rest and recovery: Bowlers need minimum 8-12 overs rest between spells Stamina recovers 20% per 10 overs rested Between innings: full recovery Overnight: full recovery Bowling styles affect wicket-taking: pace early/late, spin middle sessions Reverse swing possible after 40 overs with old ball New ball available every 80 overs with increased effectiveness Match Conditions Pitch conditions: green (seam-friendly), flat (batting paradise), dusty (spin-friendly), cracked (variable bounce) Pitch deteriorates over 5 days (favors spin and unpredictable bounce on day 4-5) Weather effects: overcast (swing), sunny (batting easier), wind (affects bowling) Session-by-session condition changes Team Management User can control one team or select both teams and let AI control both, User selects 11 players from squad of at least 15, maximum 20 Balanced team composition required (realistic mix of batsmen, all-rounders, bowlers, keeper) Bowling changes controlled by user if user in control, otherwise AI does this Declaration decisions Field settings affect run rate and wicket chances (attacking/defensive) AI Behavior Opposition makes realistic decisions on bowling changes Declares when lead is 400+ and time remaining Adjusts field based on match situation Rotates bowlers considering fatigue Aggressive batting if chasing or setting target Statistical Tracking Individual innings scores with strike rates Bowling figures (overs, maidens, runs, wickets) Partnership details Ball-by-ball log reviewable Match result summary with player of the match Implementation Style Build this as a single-file web application using vanilla HTML/CSS/JavaScript that captures the nostalgic, methodical feel of Syedur Rahman's simulator while incorporating modern Test cricket dynamics. The interface should be clean, information-dense, and allow users to progress ball-by-ball with spacebar or "Next

LandingResultScorecard
Landing

Comments (0)

No comments yet. Be the first!

Project Tasks

No tasks generated yet.

Tasks will appear here as requirements are defined.

Landing design preview
Landing: View Simulator
Setup: Choose Teams
Setup: Select Players
Setup: Choose Conditions
Match: Watch Ball-by-Ball
Match: Progress Session
Match: View Over Summary
Scorecard: View Batting Stats
Scorecard: View Bowling Figures
Result: View Match Summary