strat-gameplay-webapp/backend/tests/unit/core
Cal Corum b12905a71b CLAUDE: Add HBP (Hit By Pitch) handler to PlayResolver
Fixed missing PlayOutcome.HIT_BY_PITCH handling in resolve_outcome().
HBP was being submitted via WebSocket but rejected with error:
"Unhandled outcome: PlayOutcome.HIT_BY_PITCH"

Changes:
- Added HBP case to play_resolver.py (lines 430-446)
- HBP uses same forced runner advancement logic as WALK
- HBP is NOT classified as is_walk=True (correct for stats)
- Added 2 unit tests: test_hit_by_pitch, test_hit_by_pitch_bases_loaded

Test results: 981/981 passing (100%)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 22:53:41 -06:00
..
__init__.py CLAUDE: Complete Week 4 - State Management & Persistence 2025-10-22 12:01:03 -05:00
test_dice.py CLAUDE: Fix all unit test failures and implement 100% test requirement 2025-11-04 19:35:21 -06:00
test_flyball_advancement.py CLAUDE: Fix state recovery batter advancement and flyball descriptions 2025-11-21 15:38:29 -06:00
test_play_resolver.py CLAUDE: Add HBP (Hit By Pitch) handler to PlayResolver 2025-11-27 22:53:41 -06:00
test_roll_types.py CLAUDE: Complete Week 6 - granular PlayOutcome integration and metadata support 2025-10-29 20:29:06 -05:00
test_runner_advancement.py CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
test_state_manager.py CLAUDE: Phase 3F - Substitution System Testing Complete 2025-11-06 15:25:53 -06:00
test_substitution_rules.py CLAUDE: Phase 3F - Substitution System Testing Complete 2025-11-04 22:34:17 -06:00
test_validators.py CLAUDE: Fix squeeze_bunt validation - remove bases loaded restriction 2025-11-14 15:09:03 -06:00
test_x_check_advancement_tables.py CLAUDE: Fix all unit test failures and implement 100% test requirement 2025-11-04 19:35:21 -06:00