refactor: strip _garage suffix from adversarial test bots

Renames PatternMover_garage → PatternMover, RandomMover_garage → RandomMover,
WaveSurfer_garage → WaveSurfer. Updates all .json, .sh, .nimble, and config.nims
files to match TR Booter naming convention (directory name = bot name).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-20 10:50:32 +02:00
parent 1eaaadf627
commit 63db0a4439
21 changed files with 0 additions and 33 deletions
Binary file not shown.
@@ -0,0 +1,11 @@
{
"name": "RandomMover",
"version": "0.1.0",
"authors": ["Davide Cappellini"],
"description": "Random movement adversary — tests guns against unpredictable movement",
"homepage": "",
"countryCodes": ["IT"],
"gameTypes": ["classic", "1v1"],
"platform": "Nim",
"programmingLang": "Nim"
}
@@ -0,0 +1,11 @@
# Package
version = "0.1.0"
author = "Davide Cappellini"
description = "Random movement adversary — tests guns against unpredictable movement"
license = "MIT"
srcDir = "src"
bin = @["RandomMover"]
# Dependencies
requires "nim >= 2.0.0"
requires "tankroyale_botapi >= 1.0.1"
@@ -0,0 +1,3 @@
#!/bin/sh
cd "$(dirname "$0")"
exec ./RandomMover >> /tmp/randommover_stdout.log 2>> /tmp/randommover_stderr.log
@@ -0,0 +1,2 @@
--path:"../common_libs"
switch("outdir", "out")
@@ -0,0 +1,46 @@
# RandomMover — random speed/turn with persistence, head-on firing.
# Purpose: test guns against unpredictable movement.
import std/[math, os, random]
import tankroyale_botapi
const botJsonPath = currentSourcePath().parentDir / "RandomMover.json"
type RandomMover = ref object of Bot
currentSpeed: float
currentTurn: float
ticksUntilChange: int
proc newDirection(bot: RandomMover) =
bot.currentSpeed = rand(-8.0..8.0)
bot.currentTurn = rand(-10.0..10.0)
bot.ticksUntilChange = rand(10..20)
method onRoundStarted*(bot: RandomMover, e: RoundStartedEvent) =
randomize()
setAdjustGunForBodyTurn(true)
setAdjustRadarForBodyTurn(true)
setAdjustRadarForGunTurn(true)
newDirection(bot)
method onScannedBot*(bot: RandomMover, e: ScannedBotEvent) =
let bearing = directionTo(getX(), getY(), e.x, e.y)
let gunDelta = normalizeRelativeAngle(bearing - getGunDirection())
setGunTurnRate(gunDelta.clamp(-MAX_GUN_TURN_RATE, MAX_GUN_TURN_RATE))
if abs(gunDelta) < 10.0 and getGunHeat() <= 0.0:
discard setFire(1.0)
method run*(bot: RandomMover) =
while isRunning():
dec bot.ticksUntilChange
if bot.ticksUntilChange <= 0:
newDirection(bot)
setTargetSpeed(bot.currentSpeed)
setTurnRate(bot.currentTurn)
setRadarTurnRate(45.0)
go()
when isMainModule:
var bot = RandomMover()
start(bot, botJsonPath)