MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 144
    EDDIE
    created 12/04/12 72 code lines fight
    1561 SCORE
    24 KILLS
    631 SHOTS
    289 HITS
    45.73%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 23472
    Eddie v2.0
    created 12/07/12 76 code lines fight fork
    1485 SCORE
    5 KILLS
    118 SHOTS
    55 HITS
    46.22%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    //FightCode can only understand your robot //if its class is called Robot var go=120; var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; var clo =0 robot.clone(); if(robot.parentId!=null){ clo=-240; } robot.rotateCannon(90); robot = ev.robot; if(.6>Math.random()){ robot.ahead(go+clo); robot.turn(95); } }; Robot.prototype.onScannedRobot = function(ev) { var sr = ev.scannedRobot; var robot = ev.robot; var bFriendly = ( robot.parentId !=null && robot.parentId==sr.id); bFriendly |= ( sr.parentId !=null && sr.parentId==robot.id); if(bFriendly){ robot.back(50); } if(!bFriendly){ robot.fire(); robot.fire(); robot.rotateCannon(-15); robot.fire(); robot.fire(); robot.rotateCannon(-10); } }; Robot.prototype.onWallCollision= function(ev){ var robot = ev.robot; go=go*-1; robot.back(go); robot.rotateCannon(90); robot.back(go); robot.rotateCannon(90); } Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; if(robot.parentId!=null){ robot.turn(ev.bearing); robot.fire(); robot.fire(); robot.fire(); robot.fire(); robot.fire(); } }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.turn(20); robot.ahead(100); // trying to run away };
  • none
    Killing machine 007
    created 12/07/12 79 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 go=120; var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; var clo =0 robot.clone(); if(robot.parentId!=null){ clo=-240; } robot.rotateCannon(90); robot = ev.robot; if(.6>Math.random()){ robot.ahead(go+clo); robot.turn(95); } }; Robot.prototype.onScannedRobot = function(ev) { var sr = ev.scannedRobot; var robot = ev.robot; var bFriendly = ( robot.parentId !=null && robot.parentId==sr.id); bFriendly |= ( sr.parentId !=null && sr.parentId==robot.id); if(bFriendly){ robot.back(50); } if(!bFriendly){ robot.fire(); robot.fire(); robot.rotateCannon(-15); robot.fire(); robot.fire(); robot.rotateCannon(-10); } }; Robot.prototype.onWallCollision= function(ev){ var robot = ev.robot; go=go*-1; robot.back(go); robot.rotateCannon(90); robot.back(go); robot.rotateCannon(90); } Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; if(robot.parentId!=null){ robot.turn(ev.bearing); robot.fire(); robot.fire(); robot.fire(); robot.fire(); robot.fire(); robot.fire(); robot.fire(); } }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.turn(20); robot.ahead(100); // trying to run away };
  • # 102
    QR-bot-009
    created 12/04/12 66 code lines fight fork
    1577 SCORE
    17 KILLS
    354 SHOTS
    129 HITS
    36.34%
    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) };