strat-gameplay-webapp/backend/app/core
Cal Corum 9627a79dce CLAUDE: Add decision_required WebSocket event and quick-create testing endpoint
Backend enhancements for real-time decision workflow:

**New Features**:
- decision_required event emission when game starts and after each decision
- Quick-create endpoint (/games/quick-create) for rapid testing with pre-configured lineups
- WebSocket connection manager integration in GameEngine

**Changes**:
- game_engine.py: Added _emit_decision_required() method and set_connection_manager()
- game_engine.py: Emit decision_required on game start with 5-minute timeout
- games.py: New /quick-create endpoint with Team 35 vs Team 38 lineups
- main.py: Wire connection manager to game_engine singleton
- state_manager.py: Enhanced state management for decision phases
- play_resolver.py: Improved play resolution logic
- handlers.py: Updated WebSocket handlers for new workflow
- backend/CLAUDE.md: Added WebSocket protocol spec reference

**Why**:
Eliminates polling - frontend now gets real-time notification when decisions are needed.
Quick-create saves 2 minutes of lineup setup during each test iteration.

**Testing**:
- Manual testing with terminal client
- WebSocket event flow verified with live frontend

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 15:40:27 -06:00
..
__init__.py CLAUDE: Complete Week 4 - State Management & Persistence 2025-10-22 12:01:03 -05:00
ai_opponent.py CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
cache.py CLAUDE: Implement Phase 3A - X-Check data models and enums 2025-11-01 15:32:09 -05:00
CLAUDE.md CLAUDE: Fix critical game engine issues and refactor CLAUDE.md docs 2025-11-19 16:05:26 -06:00
dice.py CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
game_engine.py CLAUDE: Add decision_required WebSocket event and quick-create testing endpoint 2025-11-21 15:40:27 -06:00
play_resolver.py CLAUDE: Add decision_required WebSocket event and quick-create testing endpoint 2025-11-21 15:40:27 -06:00
roll_types.py CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
runner_advancement.py CLAUDE: Fix state recovery batter advancement and flyball descriptions 2025-11-21 15:38:29 -06:00
state_manager.py CLAUDE: Add decision_required WebSocket event and quick-create testing endpoint 2025-11-21 15:40:27 -06:00
substitution_manager.py CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
substitution_rules.py CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
validators.py CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
x_check_advancement_tables.py CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00