mantimon-tcg/backend
Cal Corum 325f1e8af5 Refactor turn action tracking from booleans to counters for RulesConfig support
Replace hardcoded boolean flags with integer counters to support configurable
per-turn limits from RulesConfig. This enables custom game modes with different
rules (e.g., 2 energy attachments per turn, unlimited items, etc.).

PlayerState changes:
- energy_attached_this_turn -> energy_attachments_this_turn (int)
- supporter_played_this_turn -> supporters_played_this_turn (int)
- stadium_played_this_turn -> stadiums_played_this_turn (int)
- retreated_this_turn -> retreats_this_turn (int)
- Added items_played_this_turn (int)
- Added can_play_stadium() and can_play_item() methods
- Renamed reset_turn_flags() to reset_turn_state()

Ability/CardInstance changes:
- Ability.once_per_turn (bool) -> uses_per_turn (int|None)
- CardInstance.ability_used_this_turn -> ability_uses_this_turn (int)
- Added CardInstance.can_use_ability(ability) method

All methods now properly compare counters against RulesConfig or Ability limits.
270 tests passing.
2026-01-24 23:16:37 -06:00
..
app Refactor turn action tracking from booleans to counters for RulesConfig support 2026-01-24 23:16:37 -06:00
tests Refactor turn action tracking from booleans to counters for RulesConfig support 2026-01-24 23:16:37 -06:00
.gitignore Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00
.python-version Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00
PROJECT_PLAN.json Update PROJECT_PLAN.json with completed task statuses 2026-01-24 22:37:38 -06:00
pyproject.toml Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00
uv.lock Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00