Commit Graph

3 Commits

Author SHA1 Message Date
d2146e7c5a Refactor game state management and enhance scoring logic
- Added `handleHit` function to handle various hit types (single, double, triple, home run).
- Refactored `handleBall`, `handleOut`, and `handlePitch` to return `scoredRunners` and update scores accordingly.
- Updated history management to include both `gameState` and `lineupState`.
- Improved scoreboard rendering to reflect updated scoring structure and base occupation styles.
- Enhanced navigation button styling for active lineup tab.
- Fixed UI to dynamically display scored runners and adjusted base styling in `GameStateDisplay`.
2024-12-12 06:27:39 -06:00
7203ac4c2d Refactor game logic and improve state management, add some tests
- Added `handleHit` function to handle hit types (single, double, triple, home run).
- Enhanced `handleBall` and `handlePitch` to track `scoredRunners` and update scores dynamically.
- Updated history to include both `gameState` and `lineupState`.
- Refactored UI components (`GameStateDisplay`) to use unified score structure and display detailed base states.
- Styled active lineup tab with visual emphasis.
- Introduced utility functions `encodeInning` and `decodeInning` for inning state management.
2024-12-12 06:27:39 -06:00
9cc3793a17 initial commit 2024-12-05 16:51:49 -06:00