MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 93
    aaa
    created 08/06/13 403 code lines fight
    1580 SCORE
    14 KILLS
    348 SHOTS
    134 HITS
    38.40%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    butter
    created 08/06/13 71 code lines fight
    1500 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    butter2
    created 08/06/13 87 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.scan = true; robot.turnAngle = 8; robot.dir = 1; robot.log( 'Robot created', robot.dir ); console.log( 'hi' ); if( !isClone( robot ) ) { if( robot.availableClones > 0 ) { robot.clone(); } } else { robot.turnAngle = -8; robot.turn( 45 + Math.random() * 45 ); } }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; //robot.dir *= -1; //robot.turn( 1 ); //robot.log( robot.dir ); // robot.rotateCannon( 20 ); //robot.ahead( 1 ); }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; var collided = ev.collidedRobot; if (isAlly(robot, collided)) { robot.back( 20 ); robot.turn(Math.random()*50); return; } robot.stop(); robot.rotateCannon(collided.angle); robot.fire(); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; var scanned = ev.scannedRobot; if( scanned.id != robot.parentId && robot.id != scanned.parentId ) { //robot.fire(); robot.ahead( 10 ); // robot.rotateCannon( -30 ); // robot.stop = 0; } //robot.scan = false; }; Robot.prototype.moveAround = function( ev ) { robot.ahead(100); }; Robot.prototype.onHitByBullet = function( ev ) { var robot = ev.robot; if( robot.life < 50 && robot.availableDisappears ) { robot.stop(); robot.disappear(); robot.turn( 90 ); robot.ahead( 50 ); } }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; if (isClone(robot)) { robot.turn(ev.bearing - 90); } else { robot.turn(ev.bearing + 90); robot.wall = 1; } }; var isAlly = function(robot, scanned) { return robot.id == scanned.parentId || robot.parentId == scanned.id; }; var isClone = function(robot) { return !!robot.parentId; };
  • none
    skaicoo
    created 08/06/13 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 id; var Robot = function(robot) { id = this.id; }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(50); robot.clone(); robot.life = 100; robot.turn(90); robot.log(robot); if (robot.parentId != id) { robot.rotateCannon(45); robot.rotateCannon(90); robot.turn(60); robot.ahead(250); return; } }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; var scannedRobot = ev.scannedRobot; if (scannedRobot.parentId == robot.id || scannedRobot.id == robot.parentId) { return; } if (robot.parentId == id) { robot.fire(); robot.stop(); robot.rotateCannon(40); robot.stop(); robot.fire(); robot.stop(); robot.ahead(10); robot.fire(); robot.turn(-30); robot.ahead(10); return; } for (var i=0; i<10; i++) { robot.fire(); robot.stop(); robot.fire(); robot.stop(); robot.ahead(10); robot.fire(); robot.turn(-30); robot.ahead(10); } return; }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; robot.back(150); robot.turn(60); }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.back(150); robot.turn(60); };

LATEST COMBATS

WATCH THE LAST COMBATS OF THIS PLAYER'S ARMY