Remove the geometric gate bots and its README section

The three geometric adversaries (Target, Walls, SpinBot) were force-added in
9f37db7 and are not needed: they were a one-off non-regression gate for the
old opponent-bias gun. Delete them and their README section. Keep the
score_battles.py damage/round + aim-error additions and the DrussGT bot.
This commit is contained in:
2026-10-06 08:46:38 +02:00
parent 9f37db7523
commit 9dab21f231
10 changed files with 0 additions and 356 deletions
-58
View File
@@ -1,58 +0,0 @@
import dev.robocode.tankroyale.botapi.*;
import dev.robocode.tankroyale.botapi.events.*;
import dev.robocode.tankroyale.botapi.graphics.Color;
// ------------------------------------------------------------------
// SpinBot
// ------------------------------------------------------------------
// A sample bot originally made for Robocode by Mathew Nelson.
//
// Continuously moves in a circle while firing at maximum power when
// detecting enemies.
// ------------------------------------------------------------------
public class SpinBot extends Bot {
// The main method starts our bot
public static void main(String[] args) {
new SpinBot().start();
}
// Called when a new round is started -> initialize and do some movement
@Override
public void run() {
setBodyColor(Color.BLUE);
setTurretColor(Color.BLUE);
setRadarColor(Color.BLACK);
setScanColor(Color.YELLOW);
// Repeat while the bot is running
while (isRunning()) {
// Tell the game that when we take move, we'll also want to turn right... a lot
setTurnRight(10_000);
// Limit our speed to 5
setMaxSpeed(5);
// Start moving (and turning)
forward(10_000);
}
}
// We scanned another bot -> fire hard!
@Override
public void onScannedBot(ScannedBotEvent e) {
fire(3);
}
// We hit another bot -> if it's our fault, we'll stop turning and moving,
// so we need to turn again to keep spinning.
@Override
public void onHitBot(HitBotEvent e) {
var direction = directionTo(e.getX(), e.getY());
var bearing = calcBearing(direction);
if (bearing > -10 && bearing < 10) {
fire(3);
}
if (e.isRammed()) {
turnRight(10);
}
}
}
-11
View File
@@ -1,11 +0,0 @@
{
"name": "SpinBot",
"version": "1.0",
"authors": ["Mathew Nelson, Flemming N. Larsen"],
"description": "Continuously moves in a circle firing hard. Geometric 'SpinBot' sample.",
"homepage": "",
"countryCodes": ["us", "dk"],
"gameTypes": ["classic", "1v1"],
"platform": "JVM",
"programmingLang": "Java 11"
}
-13
View File
@@ -1,13 +0,0 @@
#!/bin/sh
# Geometric-movement adversary: Tank Royale Java sample, run from source so the
# repo stays text-only. BOT_API_JAR points at the vendored bot API (override it
# if the checkout moves); the .json next to this script carries the identity.
cd "$(dirname "$0")"
export BOT_NAME="SpinBot"
export BOT_VERSION="1.0"
export BOT_AUTHORS="Mathew Nelson, Flemming N. Larsen"
export BOT_COUNTRY_CODES="us,dk"
export BOT_GAME_TYPES="classic,1v1"
export BOT_PLATFORM="JVM"
export BOT_PROG_LANG="Java 11"
exec java -cp "${BOT_API_JAR:-/home/davide/Projects/tank-royale/sample-bots/java/build/archive/lib/robocode-tankroyale-bot-api-1.0.2.jar}" SpinBot.java
-57
View File
@@ -1,57 +0,0 @@
import dev.robocode.tankroyale.botapi.*;
import dev.robocode.tankroyale.botapi.events.*;
import dev.robocode.tankroyale.botapi.graphics.Color;
// ------------------------------------------------------------------
// Target
// ------------------------------------------------------------------
// A sample bot originally made for Robocode by Mathew Nelson.
//
// A stationary robot that moves when its energy drops below a certain
// threshold. This robot demonstrates how to use custom events.
// ------------------------------------------------------------------
public class Target extends Bot {
int trigger; // Keeps track of when to move
// The main method starts our bot
public static void main(String[] args) {
new Target().start();
}
// Called when a new round is started -> initialize and do some movement
@Override
public void run() {
// Set colors
setBodyColor(Color.WHITE);
setTurretColor(Color.WHITE);
setRadarColor(Color.WHITE);
// Initially, we'll move when energy passes 80
trigger = 80;
// Add a custom event named "trigger-hit"
addCustomEvent(new Condition("trigger-hit") {
public boolean test() {
return getEnergy() <= trigger;
}
});
}
// A custom event occurred
@Override
public void onCustomEvent(CustomEvent e) {
// Check if our custom event "trigger-hit" went off
if (e.getCondition().getName().equals("trigger-hit")) {
// Adjust the trigger value, or else the event will fire again and again and again...
trigger -= 20;
// Print out energy level
System.out.println("Ouch, down to " + (int) (getEnergy() + .5) + " energy.");
// Move around a bit
turnRight(65);
forward(100);
}
}
}
-11
View File
@@ -1,11 +0,0 @@
{
"name": "Target",
"version": "1.0",
"authors": ["Mathew Nelson, Flemming N. Larsen"],
"description": "Sits still. Moves every time energy drops by 20. Geometric 'Target' sample.",
"homepage": "",
"countryCodes": ["us", "dk"],
"gameTypes": ["classic", "1v1"],
"platform": "JVM",
"programmingLang": "Java 11"
}
-13
View File
@@ -1,13 +0,0 @@
#!/bin/sh
# Geometric-movement adversary: Tank Royale Java sample, run from source so the
# repo stays text-only. BOT_API_JAR points at the vendored bot API (override it
# if the checkout moves); the .json next to this script carries the identity.
cd "$(dirname "$0")"
export BOT_NAME="Target"
export BOT_VERSION="1.0"
export BOT_AUTHORS="Mathew Nelson, Flemming N. Larsen"
export BOT_COUNTRY_CODES="us,dk"
export BOT_GAME_TYPES="classic,1v1"
export BOT_PLATFORM="JVM"
export BOT_PROG_LANG="Java 11"
exec java -cp "${BOT_API_JAR:-/home/davide/Projects/tank-royale/sample-bots/java/build/archive/lib/robocode-tankroyale-bot-api-1.0.2.jar}" Target.java
-84
View File
@@ -1,84 +0,0 @@
import dev.robocode.tankroyale.botapi.*;
import dev.robocode.tankroyale.botapi.events.*;
import dev.robocode.tankroyale.botapi.graphics.Color;
// ------------------------------------------------------------------
// Walls
// ------------------------------------------------------------------
// A sample bot originally made for Robocode by Mathew Nelson.
//
// This robot navigates around the perimeter of the battlefield with
// the gun pointed inward.
// ------------------------------------------------------------------
public class Walls extends Bot {
boolean peek; // Don't turn if there's a bot there
double moveAmount; // How much to move
// The main method starts our bot
public static void main(String[] args) {
new Walls().start();
}
// Called when a new round is started -> initialize and do some movement
@Override
public void run() {
// Set colors
setBodyColor(Color.BLACK);
setTurretColor(Color.BLACK);
setRadarColor(Color.ORANGE);
setBulletColor(Color.CYAN);
setScanColor(Color.CYAN);
// Initialize moveAmount to the maximum possible for the arena
moveAmount = Math.max(getArenaWidth(), getArenaHeight());
// Initialize peek to false
peek = false;
// turn to face a wall.
// `getDirection() % 90` means the remainder of getDirection() divided by 90.
turnRight(getDirection() % 90);
forward(moveAmount);
// Turn the gun to turn right 90 degrees.
peek = true;
turnGunLeft(90);
turnLeft(90);
// Main loop
while (isRunning()) {
// Peek before we turn when forward() completes.
peek = true;
// Move up the wall
forward(moveAmount);
// Don't peek now
peek = false;
// Turn to the next wall
turnLeft(90);
}
}
// We hit another bot -> move away a bit
@Override
public void onHitBot(HitBotEvent e) {
// If he's in front of us, set back up a bit.
var bearing = bearingTo(e.getX(), e.getY());
if (bearing > -90 && bearing < 90) {
back(100);
} else { // else he's in back of us, so set ahead a bit.
forward(100);
}
}
// We scanned another bot -> fire!
@Override
public void onScannedBot(ScannedBotEvent e) {
fire(2);
// Note that scan is called automatically when the bot is turning.
// By calling it manually here, we make sure we generate another scan event if there's a bot
// on the next wall, so that we do not start moving up it until it's gone.
if (peek) {
rescan();
}
}
}
-11
View File
@@ -1,11 +0,0 @@
{
"name": "Walls",
"version": "1.0",
"authors": ["Mathew Nelson, Flemming N. Larsen"],
"description": "Moves around the outer edge with the gun facing in. Geometric 'Walls' sample.",
"homepage": "",
"countryCodes": ["us", "dk"],
"gameTypes": ["classic", "1v1"],
"platform": "JVM",
"programmingLang": "Java 11"
}
-13
View File
@@ -1,13 +0,0 @@
#!/bin/sh
# Geometric-movement adversary: Tank Royale Java sample, run from source so the
# repo stays text-only. BOT_API_JAR points at the vendored bot API (override it
# if the checkout moves); the .json next to this script carries the identity.
cd "$(dirname "$0")"
export BOT_NAME="Walls"
export BOT_VERSION="1.0"
export BOT_AUTHORS="Mathew Nelson, Flemming N. Larsen"
export BOT_COUNTRY_CODES="us,dk"
export BOT_GAME_TYPES="classic,1v1"
export BOT_PLATFORM="JVM"
export BOT_PROG_LANG="Java 11"
exec java -cp "${BOT_API_JAR:-/home/davide/Projects/tank-royale/sample-bots/java/build/archive/lib/robocode-tankroyale-bot-api-1.0.2.jar}" Walls.java