make for two innings , add name of bowler and batsman most… · The Chat Archivemake for two innings , add name of bowler and batsman most wickets should 11
Download ▾
make for two innings , add name of bowler and batsman
most wickets should 11
AssistantRetiring the whole stadium and building a proper two-innings cricket scorer with player names, funny commentary, and 11 wicket limit.
Let me fix all the TypeScript errors and rewrite the file cleanly.
Good, the logic library is clean now. Let me build the Setup screen.
Let me fix the TypeScript errors with cleaner types.
Now the main live scoring component — this is the heart of the app.
Good. Now the main App.tsx that orchestrates everything:
Let me fix the LiveMatch component — it needs a small fix for the new batsman flow and some references:
Now let me fix the new batsman prompt flow properly — the ball is already logged, so when user enters a name we just add the batsman:
I need to fix the new batsman flow — when confirmed, just add the player, don't re-add a wicket:
Let me clean up old unused files and build:
Build successful! 🏏 Here's what I built:
Cric-Calc — Gully T20 Cricket Scorer
Two Innings with Full Player Tracking
- Configure both team names, overs per innings (5/10/15/20/30/50)
- Choose who bats first
- Pre-loaded players (Virat, Rohit, Gill, Bumrah, etc.) — add/remove anyone
- "Throw the Coin & Start" button
Live Scoring (Both Innings):
- Scoreboard: Runs/Wickets (Overs) with progress bar, run rate, extras
- Striker & Non-Striker cards: Player name, runs (balls), 4s, 6s
- Bowler card: Name, O-M-R-W format, "Change bowler" button
- Ball buttons: 0,1,2,3,4,6,Wd,Nb,W — color-coded (4=green, 6=purple, W=black)
- Target chase: Shows runs needed, balls left, required RR
- Ball history: Last 12 balls shown as colored circles
- Commentary box: Rotating funny Hindi-English commentary for every ball
- Scorecard table: Live batting figures updated per ball
- Utils: Swap Strike, Undo Last, New Bowler
- When wicket falls → yellow banner asks for new batsman name
- Type name, press Enter or OK → player added to scorecard
- Auto-transitions to Innings 2 when overs finish or 11 wickets fall
- Sets target = innings 1 score + 1
- Chasing team's players auto-loaded
- Winner with margin (runs or wickets with balls remaining)
- Both innings summary cards
- Full batting + bowling scorecards for both innings
- "New Match" button
- Proper legal/illegal ball tracking (wides/no-balls don't count as legal)
- Correct over completion (strike swap, maiden detection)
- Proper economy rate: runs / (balls/6)
- Max 11 wickets as requested
Files built: src/lib/cricket.ts, src/components/MatchSetup.tsx, src/components/LiveMatch.tsx, src/App.tsx, index.html