MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 24239
    TAKUTAKU
    created 01/03/17 244 code lines fight
    554 SCORE
    24 KILLS
    714 SHOTS
    232 HITS
    32.45%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    asaswadas
    created 01/01/17 36 code lines fight
    1500 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 23615
    asaswadas
    created 01/01/17 36 code lines fight
    1484 SCORE
    0 KILLS
    15 SHOTS
    7 HITS
    43.75%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 24557
    BARDICHE
    created 01/08/17 120 code lines fight fork
    -15 SCORE
    0 KILLS
    4 SHOTS
    2 HITS
    40.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var cannonR = 1; var cannonRC = 1; var cID; var turning = false; var tankColl = false; var tPre = 85; var tCancel = 40; //FightCode can only understand your robot //if its class is called Robot var Robot = function(robot) { }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; var collidedRobot = ev.collidedRobot; if(collidedRobot.id!=robot.parentId&&collidedRobot.id!=cID){ tankColl= true; var cannonD = robot.angle+90-robot.cannonAbsoluteAngle; if(cannonD>180){ cannonD=180-cannonD; } robot.rotateCannon(robot.angle+90-robot.cannonAbsoluteAngle); robot.fire(5); tankColl = false; }else{ tankColl= true; robot.back(100); robot.rotateCannon(-90); tankColl= false; } //robot.turn(90); }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; //robot.ahead(-100); if(robot.angle%90==0){ robot.turn(90); robot.rotateCannon(20); } }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.clone(); if(robot.parentId){ cID = robot.id; } if(!turning&& ((robot.angle==90&& robot.arenaWidth-robot.position.xtCancel) ||(robot.angle==180&&robot.arenaHeight-robot.position.ytCancel) ||(robot.angle==270&&robot.position.xtCancel) ||(robot.angle==0&&robot.position.ytCancel) )){ turning=true; robot.ahead(10); robot.turn(30); robot.ahead(30); robot.turn(30); robot.ahead(10); robot.turn(30); turning=false; }else if(!turning){ robot.ahead(30); if (robot.cannonRelativeAngle>=180){ if(cID == robot.id){ cannonRC = 1; }else{ cannonR = 1; } } else if (robot.cannonRelativeAngle<=0){ if(cID == robot.id){ cannonRC = -1; }else{ cannonR = -1; } } if(cID == robot.id){ robot.rotateCannon(cannonRC*20); }else{ robot.rotateCannon(cannonR*20); } if(robot.angle%90!=0){ if (robot.id==cID) { robot.turn(90-(robot.angle%90)); }else{ robot.turn(-(robot.angle%90)); } } } }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; var scannedRobot = ev.scannedRobot; if(scannedRobot.id!=robot.parentId&&scannedRobot.id!=cID){ robot.fire(1); if(cID == robot.id){ robot.rotateCannon(cannonRC*-20); }else{ robot.rotateCannon(cannonR*-20); } } }; Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; if(robot.life<=40){ robot.clone(); } };
  • none
    BARDICHE
    created 01/06/17 120 code lines fight fork
    0 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var cannonR = 1; var cannonRC = 1; var cID; var turning = false; var tankColl = false; var tPre = 85; var tCancel = 40; //FightCode can only understand your robot //if its class is called Robot var Robot = function(robot) { }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; var collidedRobot = ev.collidedRobot; if(collidedRobot.id!=robot.parentId&&collidedRobot.id!=cID){ tankColl= true; var cannonD = robot.angle+90-robot.cannonAbsoluteAngle; if(cannonD>180){ cannonD=180-cannonD; } robot.rotateCannon(robot.angle+90-robot.cannonAbsoluteAngle); robot.fire(5); tankColl = false; }else{ tankColl= true; robot.back(100); robot.rotateCannon(-90); tankColl= false; } //robot.turn(90); }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; //robot.ahead(-100); if(robot.angle%90==0){ robot.turn(90); robot.rotateCannon(20); } }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.clone(); if(robot.parentId){ cID = robot.id; } if(!turning&& ((robot.angle==90&& robot.arenaWidth-robot.position.xtCancel) ||(robot.angle==180&&robot.arenaHeight-robot.position.ytCancel) ||(robot.angle==270&&robot.position.xtCancel) ||(robot.angle==0&&robot.position.ytCancel) )){ turning=true; robot.ahead(10); robot.turn(30); robot.ahead(30); robot.turn(30); robot.ahead(10); robot.turn(30); turning=false; }else if(!turning){ robot.ahead(30); if (robot.cannonRelativeAngle>=180){ if(cID == robot.id){ cannonRC = 1; }else{ cannonR = 1; } } else if (robot.cannonRelativeAngle<=0){ if(cID == robot.id){ cannonRC = -1; }else{ cannonR = -1; } } if(cID == robot.id){ robot.rotateCannon(cannonRC*20); }else{ robot.rotateCannon(cannonR*20); } if(robot.angle%90!=0){ if (robot.id==cID) { robot.turn(90-(robot.angle%90)); }else{ robot.turn(-(robot.angle%90)); } } } }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; var scannedRobot = ev.scannedRobot; if(scannedRobot.id!=robot.parentId&&scannedRobot.id!=cID){ robot.fire(1); if(cID == robot.id){ robot.rotateCannon(cannonRC*-20); }else{ robot.rotateCannon(cannonR*-20); } } }; Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; if(robot.life<=40){ robot.clone(); } };
  • # 24576
    Buddy2
    created 01/01/17 37 code lines fight fork
    -30 SCORE
    0 KILLS
    5 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(300); robot.clone(parentId); }; Robot.prototype.onRobotCollision = function(ev) { robot.stop(); robot.back(50); robot.ahead(50); }; Robot.prototype.onWallCollision = function(ev) { var robot; robot = ev.robot; robot.turnRight(90); }; Robot.prototype.onScannedRobot = function(ev) { var robot; robot = ev.robot; robot.fire(); robot.turnGRight(15); robot.fire(); }; Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(90 - ev.bulletBearing); };
  • none
    [CAELUM TEAM]Megatron
    created 01/06/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) { }; 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 };
  • # 24549
    CLOCKWORKORANGE V001
    created 12/31/16 79 code lines fight fork
    -15 SCORE
    0 KILLS
    2 SHOTS
    1 HITS
    33.33%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    // sibbed metaheuristics #SIBCODE "use-strict"; var preFireRotateCanonCorrection = [2,0,2,1,2,0,-1,2]; var preFireRotateCanonCorrectionCount = 0; var preFireRotateCorrection = [0,-1,0,1,0]; // 0 var preFireRotateCorrectionCount = 0; var afterFireRotateCorrection = [8,7,9]; // 8 var afterFireRotateCorrectionCount = 0; var afterFireRotateCanonCorrection = [-15,-15]; //[-12,-20,-22,-24,-26]; // 22 / 2' var afterFireRotateCanonCorrectionCount = 0; var afterFireAhead = [10,15,-10,15,-15,10]; // 15 var afterFireAheadCount = 0; var Robot = function(r) {}; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.clone(); if (robot.parentId) { robot.rotateCannon(-10); robot.ahead(-3); robot.turn(-1); robot.ahead(-3); } else { robot.rotateCannon(10); robot.ahead(3); robot.turn(1); robot.ahead(3) }}; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; if (ev.scannedRobot.parentId == robot.id || ev.scannedRobot.id == robot.parentId) { return; }; if (robot.parentId) { robot.rotateCannon(-preFireRotateCanonCorrection); preFireRotateCanonCorrectionCount++; if (preFireRotateCanonCorrectionCount >= preFireRotateCanonCorrection.length) {preFireRotateCanonCorrection = 0; } robot.turn(-preFireRotateCorrection); preFireRotateCorrectionCount++; if (preFireRotateCorrectionCount >= preFireRotateCorrection.length) {preFireRotateCorrectionCount = 0; } robot.fire(); robot.turn(-afterFireRotateCorrection); afterFireRotateCorrectionCount++; if (afterFireRotateCorrectionCount >= afterFireRotateCorrection.length) {afterFireRotateCorrectionCount = 0; } robot.rotateCannon(-afterFireRotateCanonCorrection[afterFireRotateCanonCorrectionCount]); afterFireRotateCanonCorrectionCount++; if (afterFireRotateCanonCorrectionCount >= afterFireRotateCanonCorrection.length) {afterFireRotateCanonCorrectionCount = 0; } robot.ahead(-afterFireAhead[afterFireAheadCount]); afterFireAheadCount++; if (afterFireAheadCount >= afterFireAhead.length) {afterFireAheadCount = 0;} } else { robot.rotateCannon(preFireRotateCanonCorrection); preFireRotateCanonCorrectionCount++; if (preFireRotateCanonCorrectionCount >= preFireRotateCanonCorrection.length) {preFireRotateCanonCorrection = 0; } robot.turn(preFireRotateCorrection); preFireRotateCorrectionCount++; if (preFireRotateCorrectionCount >= preFireRotateCorrection.length) {preFireRotateCorrectionCount = 0; } robot.fire(); robot.turn(afterFireRotateCorrection); afterFireRotateCorrectionCount++; if (afterFireRotateCorrectionCount >= afterFireRotateCorrection.length) {afterFireRotateCorrectionCount = 0; } robot.rotateCannon(afterFireRotateCanonCorrection[afterFireRotateCanonCorrectionCount]); afterFireRotateCanonCorrectionCount++; if (afterFireRotateCanonCorrectionCount >= afterFireRotateCanonCorrection.length) {afterFireRotateCanonCorrectionCount = 0; } robot.ahead(afterFireAhead[afterFireAheadCount]); afterFireAheadCount++; if (afterFireAheadCount >= afterFireAhead.length) {afterFireAheadCount = 0;} } }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.disappear(); }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; if (robot.parentId) { robot.rotateCannon(45); robot.turn(-45); } else { robot.rotateCannon(-45); robot.turn(45); } }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.back(35); };
  • # 24552
    CLOCKWORKORANGE V001
    created 01/06/17 79 code lines fight fork
    -15 SCORE
    0 KILLS
    7 SHOTS
    3 HITS
    37.50%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    // sibbed metaheuristics #SIBCODE "use-strict"; var preFireRotateCanonCorrection = [2,0,2,1,2,0,-1,2]; var preFireRotateCanonCorrectionCount = 0; var preFireRotateCorrection = [0,-1,0,1,0]; // 0 var preFireRotateCorrectionCount = 0; var afterFireRotateCorrection = [8,7,9]; // 8 var afterFireRotateCorrectionCount = 0; var afterFireRotateCanonCorrection = [-15,-15]; //[-12,-20,-22,-24,-26]; // 22 / 2' var afterFireRotateCanonCorrectionCount = 0; var afterFireAhead = [10,15,-10,15,-15,10]; // 15 var afterFireAheadCount = 0; var Robot = function(r) {}; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.clone(); if (robot.parentId) { robot.rotateCannon(-10); robot.ahead(-3); robot.turn(-1); robot.ahead(-3); } else { robot.rotateCannon(10); robot.ahead(3); robot.turn(1); robot.ahead(3) }}; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; if (ev.scannedRobot.parentId == robot.id || ev.scannedRobot.id == robot.parentId) { return; }; if (robot.parentId) { robot.rotateCannon(-preFireRotateCanonCorrection); preFireRotateCanonCorrectionCount++; if (preFireRotateCanonCorrectionCount >= preFireRotateCanonCorrection.length) {preFireRotateCanonCorrection = 0; } robot.turn(-preFireRotateCorrection); preFireRotateCorrectionCount++; if (preFireRotateCorrectionCount >= preFireRotateCorrection.length) {preFireRotateCorrectionCount = 0; } robot.fire(); robot.turn(-afterFireRotateCorrection); afterFireRotateCorrectionCount++; if (afterFireRotateCorrectionCount >= afterFireRotateCorrection.length) {afterFireRotateCorrectionCount = 0; } robot.rotateCannon(-afterFireRotateCanonCorrection[afterFireRotateCanonCorrectionCount]); afterFireRotateCanonCorrectionCount++; if (afterFireRotateCanonCorrectionCount >= afterFireRotateCanonCorrection.length) {afterFireRotateCanonCorrectionCount = 0; } robot.ahead(-afterFireAhead[afterFireAheadCount]); afterFireAheadCount++; if (afterFireAheadCount >= afterFireAhead.length) {afterFireAheadCount = 0;} } else { robot.rotateCannon(preFireRotateCanonCorrection); preFireRotateCanonCorrectionCount++; if (preFireRotateCanonCorrectionCount >= preFireRotateCanonCorrection.length) {preFireRotateCanonCorrection = 0; } robot.turn(preFireRotateCorrection); preFireRotateCorrectionCount++; if (preFireRotateCorrectionCount >= preFireRotateCorrection.length) {preFireRotateCorrectionCount = 0; } robot.fire(); robot.turn(afterFireRotateCorrection); afterFireRotateCorrectionCount++; if (afterFireRotateCorrectionCount >= afterFireRotateCorrection.length) {afterFireRotateCorrectionCount = 0; } robot.rotateCannon(afterFireRotateCanonCorrection[afterFireRotateCanonCorrectionCount]); afterFireRotateCanonCorrectionCount++; if (afterFireRotateCanonCorrectionCount >= afterFireRotateCanonCorrection.length) {afterFireRotateCanonCorrectionCount = 0; } robot.ahead(afterFireAhead[afterFireAheadCount]); afterFireAheadCount++; if (afterFireAheadCount >= afterFireAhead.length) {afterFireAheadCount = 0;} } }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.disappear(); }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; if (robot.parentId) { robot.rotateCannon(45); robot.turn(-45); } else { robot.rotateCannon(-45); robot.turn(45); } }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.back(35); };
  • none
    CLOCKWORKORANGE V001
    created 12/31/16 79 code lines fight fork
    0 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    // sibbed metaheuristics #SIBCODE "use-strict"; var preFireRotateCanonCorrection = [2,0,2,1,2,0,-1,2]; var preFireRotateCanonCorrectionCount = 0; var preFireRotateCorrection = [0,-1,0,1,0]; // 0 var preFireRotateCorrectionCount = 0; var afterFireRotateCorrection = [8,7,9]; // 8 var afterFireRotateCorrectionCount = 0; var afterFireRotateCanonCorrection = [-15,-15]; //[-12,-20,-22,-24,-26]; // 22 / 2' var afterFireRotateCanonCorrectionCount = 0; var afterFireAhead = [10,15,-10,15,-15,10]; // 15 var afterFireAheadCount = 0; var Robot = function(r) {}; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.clone(); if (robot.parentId) { robot.rotateCannon(-10); robot.ahead(-3); robot.turn(-1); robot.ahead(-3); } else { robot.rotateCannon(10); robot.ahead(3); robot.turn(1); robot.ahead(3) }}; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; if (ev.scannedRobot.parentId == robot.id || ev.scannedRobot.id == robot.parentId) { return; }; if (robot.parentId) { robot.rotateCannon(-preFireRotateCanonCorrection); preFireRotateCanonCorrectionCount++; if (preFireRotateCanonCorrectionCount >= preFireRotateCanonCorrection.length) {preFireRotateCanonCorrection = 0; } robot.turn(-preFireRotateCorrection); preFireRotateCorrectionCount++; if (preFireRotateCorrectionCount >= preFireRotateCorrection.length) {preFireRotateCorrectionCount = 0; } robot.fire(); robot.turn(-afterFireRotateCorrection); afterFireRotateCorrectionCount++; if (afterFireRotateCorrectionCount >= afterFireRotateCorrection.length) {afterFireRotateCorrectionCount = 0; } robot.rotateCannon(-afterFireRotateCanonCorrection[afterFireRotateCanonCorrectionCount]); afterFireRotateCanonCorrectionCount++; if (afterFireRotateCanonCorrectionCount >= afterFireRotateCanonCorrection.length) {afterFireRotateCanonCorrectionCount = 0; } robot.ahead(-afterFireAhead[afterFireAheadCount]); afterFireAheadCount++; if (afterFireAheadCount >= afterFireAhead.length) {afterFireAheadCount = 0;} } else { robot.rotateCannon(preFireRotateCanonCorrection); preFireRotateCanonCorrectionCount++; if (preFireRotateCanonCorrectionCount >= preFireRotateCanonCorrection.length) {preFireRotateCanonCorrection = 0; } robot.turn(preFireRotateCorrection); preFireRotateCorrectionCount++; if (preFireRotateCorrectionCount >= preFireRotateCorrection.length) {preFireRotateCorrectionCount = 0; } robot.fire(); robot.turn(afterFireRotateCorrection); afterFireRotateCorrectionCount++; if (afterFireRotateCorrectionCount >= afterFireRotateCorrection.length) {afterFireRotateCorrectionCount = 0; } robot.rotateCannon(afterFireRotateCanonCorrection[afterFireRotateCanonCorrectionCount]); afterFireRotateCanonCorrectionCount++; if (afterFireRotateCanonCorrectionCount >= afterFireRotateCanonCorrection.length) {afterFireRotateCanonCorrectionCount = 0; } robot.ahead(afterFireAhead[afterFireAheadCount]); afterFireAheadCount++; if (afterFireAheadCount >= afterFireAhead.length) {afterFireAheadCount = 0;} } }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.disappear(); }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; if (robot.parentId) { robot.rotateCannon(45); robot.turn(-45); } else { robot.rotateCannon(-45); robot.turn(45); } }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.back(35); };
  • # 24277
    CLOCKWORKORANGE V001
    created 01/01/17 79 code lines fight fork
    44 SCORE
    3 KILLS
    63 SHOTS
    23 HITS
    35.94%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    // sibbed metaheuristics #SIBCODE "use-strict"; var preFireRotateCanonCorrection = [2,0,2,1,2,0,-1,2]; var preFireRotateCanonCorrectionCount = 0; var preFireRotateCorrection = [0,-1,0,1,0]; // 0 var preFireRotateCorrectionCount = 0; var afterFireRotateCorrection = [8,7,9]; // 8 var afterFireRotateCorrectionCount = 0; var afterFireRotateCanonCorrection = [-15,-15]; //[-12,-20,-22,-24,-26]; // 22 / 2' var afterFireRotateCanonCorrectionCount = 0; var afterFireAhead = [10,15,-10,15,-15,10]; // 15 var afterFireAheadCount = 0; var Robot = function(r) {}; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.clone(); if (robot.parentId) { robot.rotateCannon(-10); robot.ahead(-3); robot.turn(-1); robot.ahead(-3); } else { robot.rotateCannon(10); robot.ahead(3); robot.turn(1); robot.ahead(3) }}; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; if (ev.scannedRobot.parentId == robot.id || ev.scannedRobot.id == robot.parentId) { return; }; if (robot.parentId) { robot.rotateCannon(-preFireRotateCanonCorrection); preFireRotateCanonCorrectionCount++; if (preFireRotateCanonCorrectionCount >= preFireRotateCanonCorrection.length) {preFireRotateCanonCorrection = 0; } robot.turn(-preFireRotateCorrection); preFireRotateCorrectionCount++; if (preFireRotateCorrectionCount >= preFireRotateCorrection.length) {preFireRotateCorrectionCount = 0; } robot.fire(); robot.turn(-afterFireRotateCorrection); afterFireRotateCorrectionCount++; if (afterFireRotateCorrectionCount >= afterFireRotateCorrection.length) {afterFireRotateCorrectionCount = 0; } robot.rotateCannon(-afterFireRotateCanonCorrection[afterFireRotateCanonCorrectionCount]); afterFireRotateCanonCorrectionCount++; if (afterFireRotateCanonCorrectionCount >= afterFireRotateCanonCorrection.length) {afterFireRotateCanonCorrectionCount = 0; } robot.ahead(-afterFireAhead[afterFireAheadCount]); afterFireAheadCount++; if (afterFireAheadCount >= afterFireAhead.length) {afterFireAheadCount = 0;} } else { robot.rotateCannon(preFireRotateCanonCorrection); preFireRotateCanonCorrectionCount++; if (preFireRotateCanonCorrectionCount >= preFireRotateCanonCorrection.length) {preFireRotateCanonCorrection = 0; } robot.turn(preFireRotateCorrection); preFireRotateCorrectionCount++; if (preFireRotateCorrectionCount >= preFireRotateCorrection.length) {preFireRotateCorrectionCount = 0; } robot.fire(); robot.turn(afterFireRotateCorrection); afterFireRotateCorrectionCount++; if (afterFireRotateCorrectionCount >= afterFireRotateCorrection.length) {afterFireRotateCorrectionCount = 0; } robot.rotateCannon(afterFireRotateCanonCorrection[afterFireRotateCanonCorrectionCount]); afterFireRotateCanonCorrectionCount++; if (afterFireRotateCanonCorrectionCount >= afterFireRotateCanonCorrection.length) {afterFireRotateCanonCorrectionCount = 0; } robot.ahead(afterFireAhead[afterFireAheadCount]); afterFireAheadCount++; if (afterFireAheadCount >= afterFireAhead.length) {afterFireAheadCount = 0;} } }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.disappear(); }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; if (robot.parentId) { robot.rotateCannon(45); robot.turn(-45); } else { robot.rotateCannon(-45); robot.turn(45); } }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.back(35); };
  • # 24545
    Devil master
    created 01/04/17 20 code lines fight fork
    -15 SCORE
    0 KILLS
    3 SHOTS
    2 HITS
    50.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(100); robot.rotateCannon(360); robot.back(40); robot.rotateCannon(360); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(260); };
  • # 24502
    E.T.
    created 01/04/17 157 code lines fight
    0 SCORE
    0 KILLS
    2 SHOTS
    2 HITS
    66.67%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 24280
    E.T.
    created 01/06/17 486 code lines fight fork
    38 SCORE
    2 KILLS
    45 SHOTS
    23 HITS
    50.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var Robot=function(a) { }; var VragTank= { now:function() { },last:function() { }}; var VT= { }; var MyTank= { id:null,X:null,Y:null,Life:null,Angle:null,cannonRelativeAngle:null,cannonAbsoluteAngle:null,trendMove:1,trendRotate:1}; var MT=MyTank; var Timer=0; var timeFire=0; var timeViev=0; var myev=null; var ltm=0; var p=false; var e=false; var k=0; var X,Y; var truTurn=function(a) { if((a-90)>=0)return(a-90); else return(360+a-90); }; var yravn= { }; yravn.Set=function(a,b,c,d) { this.x1=a; this.x2=c; this.y1=b; this.y2=d; }; yravn.GetX=function(a) { var b=(((a-this.y1)*(this.x2-this.x1))/(this.y2-this.y1))+this.x1; return b; }; yravn.GetY=function(a) { var b=(((a-this.x1)*(this.y2-this.y1))/(this.x2-this.x1))+this.y1; return b; }; var truXY=function(a,b,c,d,e) { var f=a.robot; var g=d; var h=e; yravn.Set(b,c,d,e); if(d<0) { g=0; h=yravn.GetY(g); }if(e<0) { h=0; g=yravn.GetX(h); }if(d>f.arenaWidth) { g=f.arenaWidth; h=yravn.GetY(g); }if(e>f.arenaHeight) { h=f.arenaHeight; g=yravn.GetX(h); }var i= { }; i.x=Math.round(g); i.y=Math.round(h); return i; }; function clone(a) { if(a==null||typeof a!='object')return a; var b= { }; for(var c in a)b[c]=clone(a[c]); return b; }var Distance=function(a,b,c,d) { var e; e=Math.sqrt(((c-a)*(c-a))+((d-b)*(d-b))); return e; }; var Degres=function(a,b,c,d) { var e,f; if((c>=a)&(da)&(d>=b)) { e=Math.atan((d-b)/(c-a)); f=90+(e*180/Math.PI); }; if((c<=a)&(d>b)) { e=Math.atan((a-c)/(d-b)); f=180+(e*180/Math.PI); }; if((c180)c=-360+c; return c; }; var VievObject=function(a) { for(var b in a)r.log(b+':'+a[b]); }; var Moved=function(a,b) { var c=a.robot,d=null; for(d=0; d0)c.ahead(1); else c.back(1); if(c.parentId==null)Timer++; }}; var Moved1=function(a) { var b=this.robot,c=null; for(c=0; c0)b.ahead(1); else b.back(1); if(b.parentId==null)Timer++; }}; var Turned=function(a,b) { var c=a.robot,d=null; for(d=0; d0)c.turn(1); else c.turn(-1); if(c.parentId==null)Timer++; }}; var TurnedXY=function(a,b,c) { var d=a.robot,e=null; var f=Degres(d.position.x,d.position.y,b,c); var g=KratYglov(truTurn(d.cannonAbsoluteAngle),f); g=Math.round(g); Turned(a,g); }; var Rotated=function(a,b) { var c=a.robot,d=null; for(d=0; d0)c.rotateCannon(1); else c.rotateCannon(-1); if(c.parentId==null)Timer++; }}; var Fired=function(a) { var b=a.robot; b.fire(); if(b.parentId==null)Timer++; }; var RobotInfo=function(a,b) { var c=a.robot,d=a.scannedRobot; if(typeof b[d.id]=='undefined') { b[d.id]= { }; b[d.id].now= { }; b[d.id].last= { }; }; b[d.id].last=clone(b[d.id].now); var e=b[d.id].now; var f=b[d.id].last; e.x=d.position.x; e.y=d.position.y; e.life=d.life; if((d.angle+90)<360)e.angle=d.angle+90; else e.angle=((d.angle+90)-360); e.cannonAngle=d.cannonAngle+e.angle; if(e.cannonAngle>360)e.cannonAngle=e.cannonAngle-360; e.id=d.id; e.dx=e.x-f.x; e.dy=e.y-f.y; e.time=Timer; e.dt=e.time-f.time; e.vx=e.dx/e.dt; e.vy=e.dy/e.dt; e.azimut=Degres(f.x,f.y,e.x,e.y); if((typeof e.azimut=='undefined')|(typeof e.azimut=='NaN'))e.azimut=d.angle; e.step=Distance(f.x,f.y,e.x,e.y); e.v=e.step/e.dt; e.v=(Math.round(e.v*10))/10; if(e.v>1)e.v=1; e.aazimut=KratYglov(e.azimut,f.azimut)/e.dt; e.a=(e.v-f.v)/e.dt; }; MT.Initiation=function(a) { var b=a.robot; if(typeof this[b.id]=='undefined') { this[b.id]= { }; if(b.parentId==null) { this[b.id].trendMove=1; this[b.id].trendRotate=1; }else { this[b.id].trendMove=-1; this[b.id].trendRotate=-1; this[b.id].overTank=b.parentId; this[b.parentId].overTank=b.id; }this[b.id].status='poyavilsa'; this[b.id].VT= { }; }}; MT.GetXY=function(a) { var b=a.robot; var c=50; var d=this[b.id].lsatScanId; var e= { x:null,y:null}; var f=this[b.id].VT[d].now; var g=this[b.id].VT[d].last; var h=b.position.x; var i=b.position.y; var j=Distance(h,i,f.x,f.y); var k=null; var l=Timer-f.time; var m=0; if((f.v<0.5)&(f.v>0))m=0.2; if(f.v>0.5)m=-0.2; for(var n=0; n<=20; n++) { var o=(f.v*(l+(j/2))); var p=(f.azimut+(f.aazimut*l))*0.0175; var q=o*Math.sin(p); var r=o*Math.cos(p); e.x=f.x+q; e.y=f.y-r; var s= { }; s=truXY(a,f.x,f.y,e.x,e.y); e.x=s.x; e.y=s.y; j=Distance(h,i,e.x,e.y); if(Math.round(k)==Math.round(j))break; k=j; }if(j180)r-=180; var s=Math.abs(Math.round(r-90)); var m=i-s; if(m<40)m=40; var t=Degres(g,h,e.x,e.y); var u=t+90; if(u>360)u-=360; u*=0.0175; var o=m*Math.sin(u); var p=m*Math.cos(u); var v= { point1: { },point2: { }}; v.point1.x=e.x+o; v.point1.y=e.y-p; q=truXY(a,e.x,e.y,v.point1.x,v.point1.y); v.point1.x=q.x; v.point1.y=q.y; v.point2.x=e.x-o; v.point2.y=e.y+p; q=truXY(a,e.x,e.y,v.point2.x,v.point2.y); v.point2.x=q.x; v.point2.y=q.y; var w=Distance(d.point1.x,d.point1.y,v.point1.x,v.point1.y); var x=Distance(d.point1.x,d.point1.y,v.point2.x,v.point2.y); if(x>=w) { d.point2=v.point1; d.point3=v.point2; }else { d.point3=v.point2; d.point2=v.point1; }return d; }; MT.Find=function(a) { var b=a.robot; var c=this[b.id].lsatScanId; var d=this[b.id].VT[c].now; var e=this[b.id].VT[c].last; var f=b.position.x; var g=b.position.y; var h=Distance(f,g,d.x,d.y); var i=Math.atan(150/h)*57.296; i=Math.round(i); if(i>30)i=30; Turned(a,-1*i*this[b.id].trendRotate); }; MT.Uklon=function(a) { var b=a.robot; var c=this[b.id].lsatScanId; var d=this[b.id].VT[c].now; var e=this[b.id].VT[c].last; var f=Degres(d.x,d.y,b.position.x,b.position.y); var g=f-d.cannonAngle; if(g<-180)g+=360; if(g>180)g-=360; if(g>0)var h=1; else var h=-1; return h; }; Robot.prototype.onIdle=function(a) { var b=a.robot; MT.Initiation(a); var c= { }; var d; if(MT[b.id].status=='poyavilsa') { if(b.availableDisappears!=0)b.disappear(); ; if((b.availableClones==true)&(b.parentId==null))b.clone(); MT[b.id].status='poisk'; }if(MT[b.id].status=='poisk')if(truTurn(b.cannonRelativeAngle)<45)Rotated(a,1); else Turned(a,MT[b.id].trendRotate); if(MT[b.id].status=='ogon') { c=MT.GetXY(a); var e=Degres(b.position.x,b.position.y,c.x,c.y); var f=KratYglov(truTurn(b.cannonAbsoluteAngle),e); f=Math.round(f); if(f!=0)if(f<0)MT[b.id].trendRotate=1; else MT[b.id].trendRotate=-1; ; Turned(a,f); if(b.gunCoolDownTime==0) { b.fire(); MT[b.id].trendMove=MT.Uklon(a); MT[b.id].status='poteryal'; }Moved(a,1*MT[b.id].trendMove); }if(MT[b.id].status=='poteryal') { var g=55-(Timer-MT[b.id].timeView); var h=MT.GetVozvratXY(a); if(g>0) { TurnedXY(a,h.point1.x,h.point1.y); Moved(a,(1*MT[b.id].trendMove)); }else { TurnedXY(a,h.point2.x,h.point2.y); var e=Degres(b.position.x,b.position.y,h.point3.x,h.point3.y); var f=KratYglov(truTurn(b.cannonAbsoluteAngle),e); f=Math.round(f); if(f!=0)if(f<0)MT[b.id].trendRotate=-1; else MT[b.id].trendRotate=1; if(f=0)MT[b.id].trendRotate*=-1; MT[b.id].status='poisk'; }}}; Robot.prototype.onScannedRobot=function(a) { var b=a.robot; var c=a.scannedRobot; var d,e; if((a.scannedRobot.parentId==b.id)|(a.scannedRobot.id==b.parentId))return; b.stop(); RobotInfo(a,MT[b.id].VT); MT[b.id].status='ogon'; MT[b.id].lsatScanId=c.id; MT[b.id].timeView=Timer; }; Robot.prototype.onWallCollision=function(a) { var b=a.robot; b.stop(); MT[b.id].trendMove*=-1; }; Robot.prototype.onRobotCollision=function(a) { var b=a.robot; MT[b.id].trendMove*=-1; Moved(a,10*MT[b.id].trendMove); }; Robot.prototype.onHitByBullet=function(a) { var b=a.robot; var c=truTurn(b.cannonRelativeAngle); if(c>180)c-=360; if(MT[b.id].status=='poisk') { if((a.bearing-90)>0)MT[b.id].trendMove=1; else MT[b.id].trendMove=-1; if((Math.abs(a.bearing)>45)&(Math.abs(a.bearing)<135))Moved(a,50*MT[b.id].trendMove); }};
  • # 24554
    irobot
    created 01/01/17 46 code lines fight fork
    -15 SCORE
    0 KILLS
    3 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.ahead(100); robot.rotateCannon(360); robot.back(100); robot.rotateCannon(360); if(cannonAbsoluteAngle < 90){ robot.rotateCannon(cannonAbsoluteAngle == 90); } }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); robot.ahead(200);//?? }; Robot.prototype.onWallCollision = function(ev){ var robot = ev.robot; robot.turn(90); robot.turn(ev.bearing); }; Robot.prototype.onRobotCollision = function(ev){ var robot = ev.robot; robot.disappear(); robot.turn(100); robot.disappear(); robot.ahead(200); }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.clone(); robot.log("bye bye"); };
  • # 479
    kaka
    created 01/03/17 42 code lines fight
    1515 SCORE
    1 KILLS
    100 SHOTS
    10 HITS
    9.90%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    kami
    created 12/29/16 36 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.ahead(1000); // 前に1000進む }; // 照準に他のロボットが入ったら Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); // 発射 }; // ロボットが壁に当たったら Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; robot.turn(ev.bearing); // まっすぐ向く robot.turnRight(90); // 右に90度ターンする robot.rotateCannon(360); // キャノンを360度回頭する robot.ahead(1000); // 前に1000進む }; // ロボットが他のロボットに当たったら Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.turn(180); // 180度ターンする robot.ahead(1000); // 前に1000下がる };
  • # 23837
    kami
    created 12/29/16 42 code lines fight
    1470 SCORE
    0 KILLS
    26 SHOTS
    3 HITS
    11.11%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 23827
    kami
    created 12/29/16 36 code lines fight fork
    1470 SCORE
    1 KILLS
    15 SHOTS
    3 HITS
    18.75%
    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(1000); // 前に1000進む }; // 照準に他のロボットが入ったら Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); // 発射 }; // ロボットが壁に当たったら Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; robot.turn(ev.bearing); // まっすぐ向く robot.turnRight(90); // 右に90度ターンする robot.rotateCannon(360); // キャノンを360度回頭する robot.ahead(1000); // 前に1000進む }; // ロボットが他のロボットに当たったら Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.turn(180); // 180度ターンする robot.ahead(1000); // 前に1000下がる };
  • # 23851
    kami
    created 12/29/16 42 code lines fight fork
    1469 SCORE
    0 KILLS
    20 SHOTS
    3 HITS
    14.29%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var scan_flg=10; // スキャンフラグ var fire_cnt=10; // 発射数カウント var Robot = function(robot) {}; // ロボットの基本動作 Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.rotateCannon(90); robot.ahead(10); robot.ahead(1000); // 前に1進 robot.turn(1); // 右に1度ターンする if(scan_flg==1){ robot.fire(); // スキャンフラグが1(ON)の場合は、弾を発射する fire_cnt++; // 発射数をカウント if(fire_cnt > 200){ // 発射数が指定数を超えた場合、フラグとカウンタをゼロにする scan_flg=200; fire_cnt=120; } } }; // 他のロボットが見つかった時 Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); scan_flg=1; // フラグをON }; // 他のロボットと当たった時 Robot.prototype.onRobotCollision = function(ev) { }; // 壁に当たった時 Robot.prototype.onWallCollision = function(ev) { }; // 弾に当たった時 Robot.prototype.onHitByBullet = function(ev) { };
  • # 23817
    kami
    created 12/29/16 36 code lines fight fork
    1470 SCORE
    1 KILLS
    14 SHOTS
    6 HITS
    40.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(1000); // 前に1000進む }; // 照準に他のロボットが入ったら Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); // 発射 }; // ロボットが壁に当たったら Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; robot.turn(ev.bearing); // まっすぐ向く robot.turnRight(90); // 右に90度ターンする robot.rotateCannon(360); // キャノンを360度回頭する robot.ahead(1000); // 前に1000進む }; // ロボットが他のロボットに当たったら Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.turn(180); // 180度ターンする robot.ahead(1000); // 前に1000下がる };
  • none
    Maz-dev
    created 01/04/17 31 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) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(100); robot.rotateCannon(0); robot.turn(90) var robot = ev.robot; robot.turn(robot); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.ahead(100); robot.fire(3); }; Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(90 - ev.bulletBearing); robot.ahead(100); };
  • none
    OJUARA.BOT
    created 01/04/17 21 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) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(75); robot.rotateCannon(90); robot.back(75); robot.rotateCannon(90); robot.left(10); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); };
  • # 24296
    OJUARA.BOT
    created 01/04/17 21 code lines fight fork
    16 SCORE
    1 KILLS
    10 SHOTS
    10 HITS
    90.91%
    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(75); robot.rotateCannon(90); robot.back(75); robot.rotateCannon(90); robot.left(10); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); };
  • none
    sample BOT04
    created 01/04/17 41 code lines fight
    0 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 24544
    serg_tern
    created 01/04/17 52 code lines fight fork
    -15 SCORE
    0 KILLS
    2 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    function Robot(robot) {} // well, we need to do something... // whenever our robot is idle, this method gets called. Robot.prototype.onIdle = function(ev) { var robot; robot = ev.robot; robot.ahead(150); robot.rotateCannon(360); robot.back(100); robot.rotateCannon(360); r = robot.clone(); robot.turn(20); }; // this method gets called whenever we hit another robot... Robot.prototype.onRobotCollision = function(ev) {}; // this method gets called whenever we hit a wall... Robot.prototype.onWallCollision = function(ev) {}; // yay we see another robot! time to wreak some havoc... Robot.prototype.onScannedRobot = function(ev) { var robot=ev.enemy; robot = ev.robot; robot.fire(1); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.r; robot = ev.robot; robot.ahead(10); r.turn(90); r.ahead(100); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); // YAY! }; // ohhh... we were hit by another robot... Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(90 - ev.bulletBearing); };
  • none
    TAKUTAKU
    created 01/03/17 166 code lines fight
    0 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 417
    TAKUTAKU
    created 01/03/17 166 code lines fight
    1516 SCORE
    19 KILLS
    622 SHOTS
    172 HITS
    27.61%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 24503
    test
    created 01/01/17 20 code lines fight fork
    0 SCORE
    0 KILLS
    4 SHOTS
    2 HITS
    40.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(100); robot.rotateCannon(360); robot.back(100); robot.rotateCannon(360); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); };
  • # 24548
    TEST
    created 01/03/17 20 code lines fight fork
    -15 SCORE
    0 KILLS
    2 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.ahead(100); robot.rotateCannon(360); robot.back(100); robot.rotateCannon(360); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); };
  • # 24537
    TOTO44_V1
    created 12/31/16 166 code lines fight
    -15 SCORE
    0 KILLS
    14 SHOTS
    1 HITS
    6.67%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    ZAVODNOI SUHARIK
    created 01/01/17 20 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) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(100); robot.rotateCannon(360); robot.back(100); robot.rotateCannon(360); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); };
  • # 24532
    ZAVODNOI SUHARIK
    created 01/01/17 20 code lines fight fork
    -15 SCORE
    0 KILLS
    7 SHOTS
    2 HITS
    25.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(100); robot.rotateCannon(360); robot.back(100); robot.rotateCannon(360); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); };