[Home]History of RaikoNano

Robo Home | Changes | Preferences | AllPages


Revision 21 . . October 10, 2007 4:52 EST by Voidious [reverting vandalism]
Revision 20 . . October 10, 2007 4:50 EST by 166.121.37.12
  

Difference (from prior major revision) (no other diffs)

Changed: 1,3c1,37

package clitoris.fellatio;import robocode.*;import robocode.util.Utils;import java.awt.geom.Rectangle2D;public class Fellatio extends AdvancedRobot{static double direction = 1;static double bulletVelocity;public void run(){setTurnRadarRight(Double.POSITIVE_INFINITY);}public void onScannedRobot(ScannedRobotEvent e){double v1,v2,offset = 2;setTurnGunRightRadians(Utils.normalRelativeAngle((v1 = getHeadingRadians() + e.getBearingRadians()) + Math.random() * e.getVelocity() / 13 * Math.sin(e.getHeadingRadians() - v1) - getGunHeadingRadians()));while(!new Rectangle2D.Double(18,18,764,564).contains(getX() + 160 * Math.sin(v2 = v1 + direction * (offset -= .02)), getY() + 160 * Math.cos(v2)));setFire(Math.min(1100 / (v1 = e.getDistance()), getEnergy()/6));if(Math.random() > Math.pow(v1 = 0.5952 * bulletVelocity / v1, v1) || offset < 0.7){direction = -direction;}setAhead(1000 * Math.cos(v2 -= getHeadingRadians()));setTurnRightRadians(Math.tan(v2));setTurnRadarLeft(getRadarTurnRemaining());}public void onHitByBullet(HitByBulletEvent e) {bulletVelocity = e.getVelocity();}}


package wiki.nano;
import robocode.*;
import robocode.util.Utils;
import java.awt.geom.Rectangle2D;

public class RaikoNano extends AdvancedRobot {
static double direction = 1, bulletVelocity;

public void run() {
setTurnRadarRight(Double.POSITIVE_INFINITY);
}

public void onScannedRobot(ScannedRobotEvent e) {
double v1, v2, offset = 2;

setTurnGunRightRadians(Utils.normalRelativeAngle((v1 = getHeadingRadians() + e.getBearingRadians()) +
Math.random() * e.getVelocity() / 13 * Math.sin(e.getHeadingRadians() - v1) - getGunHeadingRadians()));

while(!new Rectangle2D.Double(18,18,764,564).
contains(getX() + 160 * Math.sin(v2 = v1 + direction * (offset -= .02)), getY() + 160 * Math.cos(v2)));

setFire(Math.min(1100 / (v1 = e.getDistance()), getEnergy()/6));
if(Math.random() > Math.pow(v1 = 0.5952 * bulletVelocity / v1, v1) || offset < 0.7) {
direction = -direction;
}

setAhead(1000 * Math.cos(v2 -= getHeadingRadians()));
setTurnRightRadians(Math.tan(v2));
setTurnRadarLeft(getRadarTurnRemaining());
}

public void onHitByBullet(HitByBulletEvent e) {
bulletVelocity = e.getVelocity();
}
}


Robo Home | Changes | Preferences | AllPages
Search: