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:
@@ -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) =
|
||||
|
||||
Reference in New Issue
Block a user