package kawigi.haiku; import robocode.*; public class HaikuChicken extends AdvancedRobot { /** * HaikuChicken - a Haiku perceptual bullet-dodger that could beat NanoSatan Kappa and Kakuru 1.20 some of the time. */ public void run() { turnGunRight(Double.POSITIVE_INFINITY); } public void onScannedRobot(ScannedRobotEvent e) { setTurnRight((e.getBearing() - 90)%180); setAhead(Math.tan(e.getEnergy()*5)*1000); setFire(Math.min(3, e.getEnergy()/4)); } }