strat-gameplay-webapp/backend/tests/unit
Cal Corum 2b8fea36a8 CLAUDE: Redesign dice display with team colors and consolidate player cards
Backend:
- Add home_team_dice_color and away_team_dice_color to GameState model
- Extract dice_color from game metadata in StateManager (default: cc0000)
- Add runners_on_base param to roll_ab for chaos check skipping

Frontend - Dice Display:
- Create DiceShapes.vue with SVG d6 (square) and d20 (hexagon) shapes
- Apply home team's dice_color to d6 dice, white for resolution d20
- Show chaos d20 in amber only when WP/PB check triggered
- Add automatic text contrast based on color luminance
- Reduce blank space and remove info bubble from dice results

Frontend - Player Cards:
- Consolidate pitcher/batter cards to single location below diamond
- Add active card highlighting based on dice roll (d6_one: 1-3=batter, 4-6=pitcher)
- New card header format: [Team] Position [Name] with full card image
- Remove redundant card displays from GameBoard and GameplayPanel
- Enlarge PlayerCardModal on desktop (max-w-3xl at 1024px+)

Tests:
- Add DiceShapes.spec.ts with 34 tests for color calculations and rendering
- Update DiceRoller.spec.ts for new DiceShapes integration
- Fix test_roll_dice_success for new runners_on_base parameter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 00:16:32 -06:00
..
api CLAUDE: Add critical test coverage for Phase 1 2025-11-05 12:21:35 -06:00
config CLAUDE: Remove defensive alignment field completely 2025-11-14 13:02:22 -06:00
core CLAUDE: Add exception tests and enhance stop-services script 2025-11-28 12:10:59 -06:00
middleware CLAUDE: Add rate limiting, pool monitoring, and exception infrastructure 2025-11-28 12:06:10 -06:00
models CLAUDE: Refactor offensive decisions - replace approach with action field 2025-11-14 15:07:54 -06:00
monitoring CLAUDE: Add rate limiting, pool monitoring, and exception infrastructure 2025-11-28 12:06:10 -06:00
services CLAUDE: Phases 3.5, F1-F5 Complete - Statistics & Frontend Components 2025-11-14 09:52:30 -06:00
terminal_client CLAUDE: Refactor offensive decisions - replace approach with action field 2025-11-14 15:07:54 -06:00
utils CLAUDE: Add critical test coverage for Phase 1 2025-11-05 12:21:35 -06:00
websocket CLAUDE: Redesign dice display with team colors and consolidate player cards 2026-01-24 00:16:32 -06:00
__init__.py CLAUDE: Complete Week 4 - State Management & Persistence 2025-10-22 12:01:03 -05:00