strat-gameplay-webapp/backend/app
Cal Corum 121a9082f1 CLAUDE: Implement Week 7 Task 2 - Decision Validators
- Enhanced validate_defensive_decision() with comprehensive validation:
  - Validate all alignments (normal, shifted_left, shifted_right, extreme_shift)
  - Validate all infield depths (in, normal, back, double_play)
  - Validate all outfield depths (in, normal, back)
  - Validate hold_runners require actual runners on specified bases
  - Validate hold_runners only on bases 1, 2, or 3
  - Validate double_play depth requires runner on first
  - Validate double_play depth not allowed with 2 outs

- Enhanced validate_offensive_decision() with comprehensive validation:
  - Validate all approaches (normal, contact, power, patient)
  - Validate steal_attempts only to bases 2, 3, or 4
  - Validate steal_attempts require runner on base-1
  - Validate bunt_attempt not allowed with 2 outs
  - Validate bunt_attempt and hit_and_run cannot be simultaneous
  - Validate hit_and_run requires at least one runner on base

- Added 24+ comprehensive test cases covering all edge cases:
  - 13 new defensive decision validation tests
  - 16 new offensive decision validation tests
  - All tests pass (54/54 passing)

Clear error messages for all validation failures.
Follows 'Raise or Return' pattern with ValidationError exceptions.
2025-10-30 06:38:34 -05:00
..
api CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
config CLAUDE: Complete Week 6 - granular PlayOutcome integration and metadata support 2025-10-29 20:29:06 -05:00
core CLAUDE: Implement Week 7 Task 2 - Decision Validators 2025-10-30 06:38:34 -05:00
database CLAUDE: Implement player models and optimize database queries 2025-10-28 14:08:56 -05:00
models CLAUDE: Implement Week 7 Task 1 - Strategic Decision Integration 2025-10-29 21:38:11 -05:00
utils CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
websocket CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
__init__.py CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
config.py CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
main.py CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00