feat(movement): multi-enemy awareness — phantom meteor + minimum risk track all enemies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-20 12:28:27 +02:00
parent f06b263ae5
commit ae9a5fec6d
4 changed files with 87 additions and 36 deletions
+8 -1
View File
@@ -7,9 +7,14 @@ import std/math
const BotRadius* = 18.0 ## hit detection radius in px
type
EnemyInfo* = object
id*: int
x*, y*: float
heading*, speed*, energy*: float
WorldState* = object
## All raw data given to every gun every tick.
# Enemy
# Enemy (current TARGET)
enemyX*, enemyY*: float
enemySpeed*, enemyHeading*: float
# Self
@@ -22,6 +27,8 @@ type
arenaWidth*, arenaHeight*: float
# Meta
tick*: int
# All alive enemies (for movement modules)
enemies*: seq[EnemyInfo]
GunPrediction* = object
## Absolute (x, y) where the gun predicts the enemy will be.