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`.
This commit is contained in:
2024-12-12 06:25:00 -06:00
parent 7203ac4c2d
commit d2146e7c5a
4 changed files with 88 additions and 33 deletions

View File

@@ -96,4 +96,12 @@ body {
}
border: none;
}
.lineups.nav {
.nav-item button[role=tab][aria-selected=true]{
font-weight: 900;
&:before, &:after{
content: "*";
}
}
}
}