strat-gameplay-webapp/backend/app/core
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
..
__init__.py CLAUDE: Complete Week 4 - State Management & Persistence 2025-10-22 12:01:03 -05:00
ai_opponent.py CLAUDE: Implement Week 7 Task 1 - Strategic Decision Integration 2025-10-29 21:38:11 -05:00
dice.py CLAUDE: Complete Week 6 - granular PlayOutcome integration and metadata support 2025-10-29 20:29:06 -05:00
game_engine.py CLAUDE: Implement Week 7 Task 1 - Strategic Decision Integration 2025-10-29 21:38:11 -05:00
play_resolver.py CLAUDE: Complete Week 6 - granular PlayOutcome integration and metadata support 2025-10-29 20:29:06 -05:00
roll_types.py CLAUDE: Complete Week 6 - granular PlayOutcome integration and metadata support 2025-10-29 20:29:06 -05:00
state_manager.py CLAUDE: Implement Week 7 Task 1 - Strategic Decision Integration 2025-10-29 21:38:11 -05:00
validators.py CLAUDE: Implement Week 7 Task 2 - Decision Validators 2025-10-30 06:38:34 -05:00