diff --git a/ModularBot_garage/ModularBot b/ModularBot_garage/ModularBot index 15feb17..0223372 100755 Binary files a/ModularBot_garage/ModularBot and b/ModularBot_garage/ModularBot differ diff --git a/ModularBot_garage/tests/test_all_enemies.nim b/ModularBot_garage/tests/test_all_enemies.nim new file mode 100644 index 0000000..e71f658 --- /dev/null +++ b/ModularBot_garage/tests/test_all_enemies.nim @@ -0,0 +1,28 @@ +import test_framework/test_framework +import std/os + +const myBotDir = currentSourcePath().parentDir.parentDir +let enemies = @[ + ("/home/davide/Downloads/robocode-tankroyale/sample-bots-nim-linux-1.0.7/Walls", "Walls"), + ("/home/davide/Downloads/robocode-tankroyale/sample-bots-nim-linux-1.0.7/SpinBot", "SpinBot"), + ("/home/davide/Projects/SirRoboGarage/WaveSurfer_garage", "WaveSurfer"), + ("/home/davide/Projects/SirRoboGarage/PatternMover_garage", "PatternMover"), + ("/home/davide/Downloads/robocode-tankroyale/sample-bots-nim-linux-1.0.7/TrackFire", "TrackFire"), +] + +echo "Running ModularBot (8 guns) vs all enemies, 10 rounds each" +echo "===========================================================" + +for (enemyPath, enemyName) in enemies: + echo "\n--- vs " & enemyName & " ---" + let result = runBattle(@[myBotDir, enemyPath], rounds = 10, timeout = 180) + + # Print scores table + echo "Round Results:" + for r in result.rounds: + echo " Round " & $r.round & ":" + for br in r.results: + echo " " & br.name & ": " & $br.score & " (rank " & $br.rank & ")" + +echo "\n===========================================================" +echo "All battles complete."