MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 161
    BL▲CK
    created 08/05/17 37 code lines fight
    1557 SCORE
    43 KILLS
    776 SHOTS
    353 HITS
    45.43%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 23624
    BL▲CK 1.1
    created 08/05/17 37 code lines fight
    1482 SCORE
    0 KILLS
    13 SHOTS
    6 HITS
    42.86%
    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) };