MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 559
    FidjyNator
    created 12/06/12 52 code lines fight fork
    1500 SCORE
    3 KILLS
    38 SHOTS
    24 HITS
    61.54%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    //FightCode can only understand your robot //if its class is called Robot var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(50); robot.rotateCannon(90); robot.ahead(50); robot.rotateCannon(90); robot.back(150); robot.rotateCannon(90); robot.back(50); robot.rotateCannon(90); robot.clone(); }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; robot.turn(ev.bearing); }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; var parent = ev.collidedRobot; robot.turn(20); if (parent.parentId !== robot.id){ robot.fire(); } robot.ahead(100); // trying to run away }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; var parent = ev.scannedRobot; if (parent.parentId !== robot.id){ robot.fire(); } robot.fire(); }; Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(90 - ev.bulletBearing); };

LATEST COMBATS

WATCH THE LAST COMBATS OF THIS PLAYER'S ARMY