import std/os import std/strutils import test_framework/test_framework if not existsEnv("TR_SERVER_JAR") or not existsEnv("TR_BATTLE_RUNNER"): echo "Skipping: TR_SERVER_JAR / TR_BATTLE_RUNNER not set" quit(0) let modularBotDir = "/home/davide/Projects/SirRoboGarage/ModularBot_garage" let sampleBotsDir = "/home/davide/Downloads/robocode-tankroyale/sample-bots-nim-linux-1.0.7" echo "\nSingle round: ModularBot vs SpinBot" let r = runBattle(@[modularBotDir, sampleBotsDir / "SpinBot"], rounds = 1) for i, round in r.rounds: echo "\nRound " & $i & " details:" for bot in round.results: echo " " & bot.name & ": score=" & $bot.score & " survived=" & $bot.survived echo "\nFinal: " & r.results[0].name & " " & $r.results[0].totalScore & " vs " & r.results[1].name & " " & $r.results[1].totalScore