MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • none
    [CAELUM TEAM]Megatron
    created 12/04/12 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) { }; 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 };
  • none
    [CAELUM TEAM]Megatron
    created 12/04/12 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) { }; 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 };
  • none
    Destroyer of the worlds
    created 12/04/12 62 code lines fight fork
    1500 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var target = false; var delta = 0; var hitTimestamp = -10; var direction = true; //FightCode can only understand your robot //if its class is called Robot var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { delta++; var robot = ev.robot; if(!target) { robot.turn(tn = -16 + Math.random() * 32 | 0); direction ? robot.ahead(32) : robot.back(32); } else { robot.turn(15); robot.rotateCannon(-15); robot.fire(); robot.ahead(10); } if(delta % 20 == 0) { robot.turn(15); robot.rotateCannon(-15); target = false; } if(delta - hitTimestamp < 10) { } else { if(target) { robot.ahead(1); } } }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); target = ev.scannedRobot; // robot.rotateCannon(robot.cannonAbsoluteAngle - robot.angle); // robot.turn(-robot.cannonRelativeAngle); }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; hitTimestamp = delta; robot.turn(90); robot.back(100); }; Robot.prototype.onWallCollision = function(ev) { direction = !direction; };
  • # 23512
    marhub
    created 12/04/12 26 code lines fight fork
    1484 SCORE
    1 KILLS
    24 SHOTS
    17 HITS
    68.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.ahead(20); robot.turn(10); robot.rotateCannon(20); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(1); }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turn(ev.bearing); // Turn to wherever the bullet was fired robot.fire(3); // so we can see who shot it };
  • none
    Rezot
    created 12/04/12 0 code lines fight fork
    1500 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var target = false; var delta = 0; var hitTimestamp = -10; var direction = true; //FightCode can only understand your robot //if its class is called Robot var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { delta++; var robot = ev.robot; if(!target) { robot.turn(tn = -16 + Math.random() * 32 | 0); direction ? robot.ahead(32) : robot.back(32); } else { robot.fire(); } if(delta % 20 == 0) { robot.rotateCannon(-15); target = false; } if(delta - hitTimestamp < 10) { } else { if(target) { robot.ahead(32); } } }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); target = ev.scannedRobot; // robot.rotateCannon(robot.cannonAbsoluteAngle - robot.angle); // robot.turn(-robot.cannonRelativeAngle); }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; hitTimestamp = delta; robot.turn(45); robot.back(100); }; Robot.prototype.onWallCollision = function(ev) { direction = !direction; };
  • none
    test
    created 12/04/12 44 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 enemyFound = false; var enemy = null; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; function find() { if(!enemyFound) { robot.rotateCannon(360); }else{ robot.rotateCannon(enemy.angle); } } }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); var enemyFound = true; enemy = ev.scannedRobot; }; // ohhh... we were hit by another robot... Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(ev.bulletBearing-90); };