MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • none
    2
    created 03/27/14 0 code lines fight fork
    1500 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) { var rx = robot.position.x; var ry = robot.position.y; var aH = robot.arenaHeight; var aW = robot.arenaWidth; robot.clone() }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; if(robot.parentId) { robot.turn(1); robot.ahead(1); robot.rotateCannon(1); } else { robot.turn(-1); robot.rotateCannon(-1); robot.ahead(-1); } }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; if(robot.parentId) { robot.turn(20); robot.back(20); robot.rotateCannon(-20) } else { robot.turn(-20); robot.rotateCannon(20) robot.back(100); } }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; if(robot.parentId) { robot.turn(20); robot.back(20); } else { robot.turn(-20); robot.back(100); } }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot, scannedRobot = ev.scannedRobot; if (robot.id == scannedRobot.parentId || robot.parentId == scannedRobot.id) { return; } if (scannedRobot.parentId && scannedRobot.id == scannedRobot.parentId) { return; } robot.fire(); // if(robot.parentId) robot.rotateCannon(-25) else robot.rotateCannon(25) };
  • # 23464
    Battle Franky 8
    created 03/25/14 991 code lines fight
    1485 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    Blue Tester
    created 04/10/14 1 code lines fight
    1500 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 432
    DOJOBOT_0.2
    created 03/27/14 102 code lines fight
    1515 SCORE
    1 KILLS
    47 SHOTS
    10 HITS
    20.83%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 115
    Eater of Eggs
    created 03/26/14 1704 code lines fight
    1567 SCORE
    7 KILLS
    126 SHOTS
    60 HITS
    47.24%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    Oro Jackson
    created 03/28/14 98 code lines fight
    1500 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    proxima
    created 03/26/14 49 code lines fight fork
    1500 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.prototype.onIdle = function(ev) { var robot = ev.robot; robot.clone(); robot.ahead(100); robot.rotateCannon(360); robot.back(100); robot.rotateCannon(360); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; var scanned =ev.scannedRobot; if(scanned.id !== robot.parentId && scanned.parentId !== robot.id) { robot.fire(); robot.rotateCannon(-3); robot.rotateCannon(-30); }else{ robot.ahead(30); } }; Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(90 - ev.bulletBearing); robot.ahead(-50); robot.turn(60 - ev.bulletBearing); robot.back(90); }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.ahead(robot.position+5); robot.ahead(robot.position-15); // trying to run away };