Skip to content

Instantly share code, notes, and snippets.

@ogajduse ogajduse/ukazka
Created Dec 6, 2018

Embed
What would you like to do?
ukazka.java
package sample;
import robocode.HitRobotEvent;
import robocode.Robot;
import robocode.ScannedRobotEvent;
import robocode.HitByBulletEvent;
public class TankBoss extends Robot{
public void run() {
while (true) {
turnLeft(315.1184235873342);
turnGunLeft(215.75649082512484);
turnGunLeft(224.00976548547163);
turnRight(55.27596446793928);
turnGunLeft(107.74889495189824);
turnLeft(109.65763340884122);
turnGunLeft(357.6319212953152);
ahead(15.727754348529768);
}
}
public void onScannedRobot(ScannedRobotEvent e) {
fire(4.129764381947119);
fire(3.378274770862186);
turnGunRight(157.873280743513);
turnGunLeft(2.7650026599214117);
fire(3.102758984206824);
turnRight(27.795673154299337);
}
public void onHitRobot(HitRobotEvent event) {
fire(1.063414852245295);
ahead(-33.13949964138449);
turnGunRight(243.52819796589839);
ahead(31.402281826372857);
fire(0.8793626598625232);
turnGunLeft(225.46216212577792);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.