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
+5
View File
@@ -88,6 +88,10 @@ proc printConfig(bot: ModularBot, changed: string = "") =
echo CLR_ROUND & "[config]" & CLR_RST & " " & gunColor & "gun=" & gunName & CLR_RST & " | " & CLR_MOVE & "move=phantom_meteor" & CLR_RST & " | " & radarColor & "radar=" & radarName & CLR_RST & " | enemies=" & $bot.enemyTracker.allAlive().len & " target=#" & $bot.currentTargetId
proc buildState(bot: ModularBot, ex, ey, espeed, eheading, eenergy: float): WorldState =
var ei: seq[EnemyInfo]
for es in bot.enemyTracker.allAlive():
ei.add EnemyInfo(id: es.id, x: es.x, y: es.y,
heading: es.heading, speed: es.speed, energy: es.energy)
WorldState(
enemyX: ex,
enemyY: ey,
@@ -103,6 +107,7 @@ proc buildState(bot: ModularBot, ex, ey, espeed, eheading, eenergy: float): Worl
arenaWidth: getArenaWidth().float,
arenaHeight: getArenaHeight().float,
tick: bot.tick,
enemies: ei,
)
method onScannedBot*(bot: ModularBot, e: ScannedBotEvent) =