## DevControlBot — control skeleton: boots, stands still, does nothing. ## ## Team convention: white means "not programmed yet", so body, gun and radar are ## all plain white. Colors are applied once at initialization, never per tick. ## ## This module is both the bot type and the program entry point (see isMainModule ## below); there is no separate top-level DevControlBot.nim. ## ## API: robocode_tankroyale_botapi 1.0.7 (the renamed tankroyale_botapi package). import std/os import robocode_tankroyale_botapi type DevControlBot* = ref object of Bot proc newDevControlBot*(): DevControlBot = result = DevControlBot() setBodyColor(WHITE) setTurretColor(WHITE) setGunColor(WHITE) setRadarColor(WHITE) method run*(bot: DevControlBot) = while isRunning(): go() when isMainModule: # argv[1] may override the metadata file (used by DevControlBot/DevControlBot.sh); # otherwise the JSON next to this source, resolved at compile time so any cwd works. let jsonPath = if paramCount() >= 1: paramStr(1) else: currentSourcePath().parentDir / "DevControlBot.json" var bot = newDevControlBot() start(bot, jsonPath)