MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 23835
    Fat Man
    created 12/14/17 40 code lines fight fork
    1497 SCORE
    4 KILLS
    54 SHOTS
    22 HITS
    40.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    //FightCode can only understand your robot //if its class is called Robot var Robot = function(r) { }; Robot.prototype.onIdle = function(ev) { var r = ev.robot; r.clone(); r.rotateCannon(360); r.ahead(150); r.turn(30); r.ahead(150); }; Robot.prototype.onScannedRobot = function(ev) { var r = ev.robot; if (ev.scannedRobot.parentId == r.id || ev.scannedRobot.id == r.parentId) { return; }; r.rotateCannon(2); r.fire(); r.turn(8); r.rotateCannon(-20); r.ahead(15); }; Robot.prototype.onHitByBullet = function(ev) { var r = ev.robot; r.disappear(); }; Robot.prototype.onWallCollision = function(ev) { var r = ev.robot; r.back(50); }; Robot.prototype.onRobotCollision = function(ev) { var r = ev.robot; r.back(30); };
  • # 16
    Fat Man 2
    created 12/14/17 40 code lines fight
    1685 SCORE
    149 KILLS
    3,189 SHOTS
    1,227 HITS
    38.46%
    AVERAGE HITS/SHOT
    SCORE OVER TIME