strat-gameplay-webapp/backend/app/core
Cal Corum b95c5837b0 CLAUDE: Extract common resolution logic to _finalize_play method
Issue #5 from code review - resolve_play and resolve_manual_play shared
~70% of their code causing maintenance burden and divergent behavior risk.

Changes:
- Extracted common finalization logic to new _finalize_play() method
- resolve_play reduced from ~150 lines to ~60 lines
- resolve_manual_play reduced from ~135 lines to ~60 lines
- Single source of truth for: roll tracking, state capture, transaction
  handling, inning advance, cleanup, and state updates

Benefits:
- Changes to play finalization only need to be made in one place
- Reduced risk of divergent behavior between resolution modes
- Better testability and maintainability

All 739 unit tests passing (1 flaky probabilistic test occasionally fails).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:44:04 -06:00
..
__init__.py CLAUDE: Complete Week 4 - State Management & Persistence 2025-10-22 12:01:03 -05:00
ai_opponent.py CLAUDE: Session 1 cleanup complete - Parts 4-6 2025-11-14 13:54:34 -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: Fix all unit test failures and implement 100% test requirement 2025-11-04 19:35:21 -06:00
game_engine.py CLAUDE: Extract common resolution logic to _finalize_play method 2025-11-19 16:44:04 -06:00
play_resolver.py CLAUDE: Fix all unit test failures and implement 100% test requirement 2025-11-04 19:35:21 -06:00
roll_types.py CLAUDE: Complete Week 6 - granular PlayOutcome integration and metadata support 2025-10-29 20:29:06 -05:00
runner_advancement.py CLAUDE: Fix runner_advancement for new GameState structure 2025-11-04 16:03:46 -06:00
state_manager.py CLAUDE: Fix pitcher/catcher recovery and lineup data format 2025-11-19 16:30:05 -06:00
substitution_manager.py CLAUDE: Add LineupService and SBA API client for player data integration 2025-11-19 11:55:18 -06:00
substitution_rules.py CLAUDE: Phase 3F - Substitution System Testing Complete 2025-11-04 22:34:17 -06:00
validators.py CLAUDE: Fix squeeze_bunt validation - remove bases loaded restriction 2025-11-14 15:09:03 -06:00
x_check_advancement_tables.py CLAUDE: Fix critical X-Check bugs and improve dice rolling 2025-11-02 23:09:16 -06:00