strat-gameplay-webapp/backend/terminal_client
Cal Corum e165b449f5 CLAUDE: Refactor offensive decisions - replace approach with action field
Backend refactor complete - removed all deprecated parameters and replaced
with clean action-based system.

Changes:
- OffensiveDecision model: Added 'action' field (6 choices), removed
  deprecated 'hit_and_run' and 'bunt_attempt' boolean fields
- Validators: Added action-specific validation (squeeze_bunt, check_jump,
  sac_bunt, hit_and_run situational constraints)
- WebSocket handler: Updated submit_offensive_decision to use action field
- Terminal client: Updated CLI, REPL, arg parser, and display for actions
- Tests: Updated all 739 unit tests (100% passing)

Action field values:
- swing_away (default)
- steal (requires steal_attempts parameter)
- check_jump (requires runner on base)
- hit_and_run (requires runner on base)
- sac_bunt (cannot use with 2 outs)
- squeeze_bunt (requires R3, not with bases loaded, not with 2 outs)

Breaking changes:
- Removed: hit_and_run boolean → use action="hit_and_run"
- Removed: bunt_attempt boolean → use action="sac_bunt" or "squeeze_bunt"
- Removed: approach field → use action field

Files modified:
- app/models/game_models.py
- app/core/validators.py
- app/websocket/handlers.py
- terminal_client/main.py
- terminal_client/arg_parser.py
- terminal_client/commands.py
- terminal_client/repl.py
- terminal_client/display.py
- tests/unit/models/test_game_models.py
- tests/unit/core/test_validators.py
- tests/unit/terminal_client/test_arg_parser.py
- tests/unit/terminal_client/test_commands.py

Test results: 739/739 passing (100%)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 15:07:54 -06:00
..
update_docs CLAUDE: Refactor game models and modularize terminal client 2025-10-28 14:16:38 -05:00
__init__.py CLAUDE: Add interactive terminal client for game engine testing 2025-10-26 12:51:01 -05:00
__main__.py CLAUDE: Add interactive terminal client for game engine testing 2025-10-26 12:51:01 -05:00
arg_parser.py CLAUDE: Refactor offensive decisions - replace approach with action field 2025-11-14 15:07:54 -06:00
CLAUDE.md CLAUDE: Update documentation for GameState refactoring and X-Check testing 2025-11-04 16:09:58 -06:00
commands.py CLAUDE: Refactor offensive decisions - replace approach with action field 2025-11-14 15:07:54 -06:00
completions.py CLAUDE: Add interrupt plays, jump roll, and fielding roll testing commands to terminal client 2025-11-04 13:54:51 +00:00
config.py CLAUDE: Add interactive terminal client for game engine testing 2025-10-26 12:51:01 -05:00
display.py CLAUDE: Refactor offensive decisions - replace approach with action field 2025-11-14 15:07:54 -06:00
help_text.py CLAUDE: Fix all unit test failures and implement 100% test requirement 2025-11-04 19:35:21 -06:00
main.py CLAUDE: Refactor offensive decisions - replace approach with action field 2025-11-14 15:07:54 -06:00
repl.py CLAUDE: Refactor offensive decisions - replace approach with action field 2025-11-14 15:07:54 -06:00