Implement uncapped hit decision tree (SINGLE_UNCAPPED, DOUBLE_UNCAPPED) #6
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.Resolution (Backend Complete)
Implemented a full interactive multi-step decision tree for uncapped hits, following the same pattern as the existing X-Check interactive workflow.
Decision Flow
Files Modified (5)
backend/app/models/game_models.pyPendingUncappedHitmodel, extendedGameState, 5 new decision phasesbackend/app/core/game_engine.pyresolve_manual_play(),initiate_uncapped_hit(), 5 submit methods, 3 result builders, fixed_emit_decision_required()backend/app/websocket/handlers.pybackend/app/core/ai_opponent.pybackend/app/core/play_resolver.pyTests Added (3 new files, 80 tests)
test_tt_uncapped_hits.pytest_uncapped_hit_workflow.pytest_uncapped_hit_handlers.pyTotal: 2481 unit tests passing (80 new, 0 regressions)
Follow-up
Frontend UI for the decision workflow tracked in a separate issue.
Original description below for reference:
Original Issue
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 locationExpected Behavior
Uncapped hits should resolve runner advancement based on hit location via interactive decision tree.
Files
backend/app/core/play_resolver.py- Main implementation (lines 510-607)backend/tests/unit/core/truth_tables/- Test location