MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 18986
    arch
    created 04/16/14 32 code lines
    1418 SCORE
    3 KILLS
    601 SHOTS
    28 HITS
    4.65%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    SeekerFork
    created 04/18/14 38 code lines fork
    0 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    //FightCode can only understand your robot //if its class is called Robot var Robot = function(robot){ robot.turn(25); this.offset = 1; // robot.clone(); }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.turn(1); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot, scannedRobot = ev.scannedRobot; if (robot.id == scannedRobot.parentId || robot.parentId == scannedRobot.id) { //robot.clone(); return; } robot.stop(); for (var i=0; i<15; i++) { robot.fire(); robot.ahead(10); } }; Robot.prototype.onWallCollision = function(ev) { ev.robot.stop(); ev.robot.turn(10); }; Robot.prototype.onRobotCollided = function(ev) { ev.robot.stop(); this.offset = -1 * this.offset; ev.robot.turn(10 * this.offset); };
  • # 2935
    SuicideKing
    created 04/16/14 70 code lines
    1551 SCORE
    54 KILLS
    1,454 SHOTS
    534 HITS
    36.70%
    AVERAGE HITS/SHOT
    SCORE OVER TIME