refactor(game): add Map.closest and improve flag assignment logic
- Introduced `Map.closest` to encapsulate nearest‑position search and replaced duplicated distance loops in flag targeting. - Updated flag assignment to consider enemy players carrying flags and to use the new helper for both ally and enemy flag selection. - Cleaned up unused imports and renamed `mypolicy` to `mypolicy.py` for clarity. - Adjusted frontend `game_config.json` to use new team identifiers, increase players to 3, raise flag count to 9, and enable random flag placement.
This commit is contained in:
BIN
CTF/backend/lib/__pycache__/game_engine.cpython-312.pyc
Normal file
BIN
CTF/backend/lib/__pycache__/game_engine.cpython-312.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user