MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • none
    Pecheneg
    created 03/28/13 71 code lines fight
    1500 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    tester
    created 06/19/17 69 code lines 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 rotate = true; var dist = 10; var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { var r = ev.robot; // //if (r.cannonAbsoluteAngle != 0) //{r.rotateCannon(360 - r.cannonAbsoluteAngle); r.fire()} //r.ahead(100); //r.turn(10); //r.ahead(150); //r.fire(); r.clone(); if (r.gunCoolDownTime == 0) { r.rotateCannon(100); r.back(100); } //r.log('cd:'+r.gunCoolDownTime); }; Robot.prototype.onScannedRobot = function(ev) { var r = ev.robot; //r.log('aaa:' + ev.scannedRobot.life); if (ev.scannedRobot.parentId == r.id || ev.scannedRobot.id == r.parentId) { return; }; r.fire(); dist = Math.sqrt( Math.abs( Math.pow(r.position.x - ev.scannedRobot.position.x,2) + Math.pow(r.position.y - ev.scannedRobot.position.y,2)) ); r.log('dist:'+dist); //r.log('arenaWidth '+r.arenaHeight); rotate = false; r.rotateCannon(-20); r.ahead(20); //r.rotateCannon(-25); //r.rotateCannon(2); //r.turn(8); //r.rotateCannon(-20); }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; robot.back(20); robot.turn(80) }; Robot.prototype.onHitByBullet = function(ev) { var r = ev.robot; r.disappear(); //r.back(50); r.rotateCannon(bearing - 10); dist = 10; };
  • none
    TimeToFeed
    created 03/27/13 69 code lines fight
    1500 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME

LATEST COMBATS

WATCH THE LAST COMBATS OF THIS PLAYER'S ARMY