Implement uncapped hit decision tree (SINGLE_UNCAPPED, DOUBLE_UNCAPPED) #5
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The play resolver currently stubs uncapped hits (
SINGLE_UNCAPPED/DOUBLE_UNCAPPED) by treating them asSINGLE_1andDOUBLE_2respectively. These outcomes need proper hit-location-based runner advancement logic.Current Behavior
SINGLE_UNCAPPED(si(cf) on pitching card) → falls through to_advance_on_single_1()regardless of hit locationDOUBLE_UNCAPPED(do(cf) on pitching card) → falls through to_advance_on_double_2()regardless of hit locationSee
backend/app/core/play_resolver.py:523and:591Expected Behavior
Uncapped hits should resolve runner advancement based on hit location:
SINGLE_UNCAPPED
DOUBLE_UNCAPPED
Runner advancement patterns should follow the Strat-O-Matic uncapped hit chart rules where the fielder location determines whether runners advance extra bases or hold.
Implementation Notes
hit_locationis passed intoresolve_outcome()and available in both code paths1B, 2B, SS, 3B, LF, CF, RF, P, C_resolve_uncapped_single()and_resolve_uncapped_double()backend/tests/unit/core/truth_tables/Files
backend/app/core/play_resolver.py- Main implementation (lines 510-607)backend/tests/unit/core/truth_tables/- Test locationReferences
_advance_on_single_1,_advance_on_single_2,_advance_on_double_2,_advance_on_double_3.claude/implementation/phase-3.5-polish-stats.md:961-1019PlayOutcome.is_uncapped()helper already exists