mantimon-tcg/backend
Cal Corum fe2e1091f9 Add comprehensive engine tests and fix action field name bugs
Bug fixes in engine.py:
- PlayPokemonAction: card_id -> card_instance_id
- PlayTrainerAction: card_id -> card_instance_id
- UseAbilityAction: pokemon_card_id -> pokemon_id
- SelectActiveAction: card_id -> pokemon_id
- record_ability_use() -> ability_uses_this_turn += 1

Added 26 new tests covering:
- Energy deck setup (Pokemon Pocket style)
- Prize card mode
- Deck size validation (too large)
- PlayPokemonAction (to active, to bench, not found)
- EvolvePokemonAction (success, not in hand, target not found)
- PlayTrainerAction (item, supporter, stadium, replacement)
- UseAbilityAction (success, not found, invalid index)
- SelectActiveAction (forced action, not on bench)
- Deck-out on turn start
- Attack edge cases (no energy, invalid index)
- Retreat without bench
- Attach energy from energy zone

Test count: 711 -> 737 (+26)
Coverage: 89% -> 94% overall, engine.py 55% -> 81%
2026-01-25 13:34:42 -06:00
..
app Add comprehensive engine tests and fix action field name bugs 2026-01-25 13:34:42 -06:00
references Add interactive console testing script for manual testing 2026-01-25 00:52:35 -06:00
tests Add comprehensive engine tests and fix action field name bugs 2026-01-25 13:34:42 -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 Add GameEngine orchestrator with full game lifecycle support 2026-01-25 13:21:41 -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