There was an error while loading. Please reload this page.
1 parent 5c0dc93 commit bf8543cCopy full SHA for bf8543c
1 file changed
bots/python/Vector/src/Vector.py
@@ -8,6 +8,7 @@
8
raise SystemExit(0)
9
10
from robocode_tank_royale.bot_api.bot import Bot
11
+from robocode_tank_royale.bot_api.events import ScannedBotEvent
12
13
14
class Vector(Bot):
@@ -19,6 +20,12 @@ def run(self) -> None:
19
20
self.set_turn_right(30)
21
self.forward(10_000)
22
23
+ def on_scanned_bot(self, event: ScannedBotEvent) -> None:
24
+ """Aim at the detected opponent and fire before continuing the scan."""
25
+ self.turn_gun_right(self.gun_bearing_to(float(event.x), float(event.y)))
26
+ self.fire(3)
27
+ self.rescan()
28
+
29
30
def main() -> None:
31
Vector().start()
0 commit comments