strat-gameplay-webapp/backend/terminal_client
Cal Corum b40465ca8a CLAUDE: Add terminal client commands for manual outcome testing
New Commands:
- manual_outcome <outcome> [location] - Validates ManualOutcomeSubmission
  - Tests outcome and location validation
  - Shows which outcomes require hit location
  - Displays clear validation errors

- test_location <outcome> [handedness] [count] - Tests hit location distribution
  - Generates sample hit locations for an outcome
  - Shows distribution table with percentages
  - Validates pull rates (45% pull, 35% center, 20% opposite)
  - Supports both LHB and RHB

Implementation:
- Added validate_manual_outcome() to GameCommands class
- Added test_hit_location() to GameCommands class
- Added do_manual_outcome() to REPL
- Added do_test_location() to REPL
- Uses ManualOutcomeSubmission model from Task 3
- Uses calculate_hit_location() helper from Task 3

Testing:
- Tested manual_outcome with valid outcomes (groundball_c SS, strikeout)
- Tested manual_outcome with invalid outcome (proper error display)
- Tested test_location with groundball_c for RHB (shows distribution)
- All validation and display working correctly

Note: Full play resolution integration deferred to Week 7 Task 6 (WebSocket handlers).
      These commands validate and test the new models but don't resolve plays yet.

Files Modified:
- terminal_client/commands.py (+117 lines)
- terminal_client/repl.py (+65 lines)
2025-10-30 15:25:30 -05: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 game models and modularize terminal client 2025-10-28 14:16:38 -05:00
CLAUDE.md CLAUDE: Implement player models and optimize database queries 2025-10-28 14:08:56 -05:00
commands.py CLAUDE: Add terminal client commands for manual outcome testing 2025-10-30 15:25:30 -05:00
completions.py CLAUDE: Add manual outcome testing to terminal client and Phase 3 planning 2025-10-29 20:53:47 -05:00
config.py CLAUDE: Add interactive terminal client for game engine testing 2025-10-26 12:51:01 -05:00
display.py CLAUDE: Implement player models and optimize database queries 2025-10-28 14:08:56 -05:00
help_text.py CLAUDE: Add manual outcome testing to terminal client and Phase 3 planning 2025-10-29 20:53:47 -05:00
main.py CLAUDE: Refactor game models and modularize terminal client 2025-10-28 14:16:38 -05:00
repl.py CLAUDE: Add terminal client commands for manual outcome testing 2025-10-30 15:25:30 -05:00