MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 156
    BL▲CK
    created 08/05/17 37 code lines fight
    1575 SCORE
    51 KILLS
    991 SHOTS
    422 HITS
    42.54%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 755
    BL▲CK 1.1
    created 08/05/17 37 code lines fight
    1511 SCORE
    2 KILLS
    64 SHOTS
    27 HITS
    41.54%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    QR-bot-009
    created 08/05/17 0 code lines fight 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) { 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) };