MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 629
    davinci2robot
    created 09/13/17 45 code lines fight
    1500 SCORE
    3 KILLS
    156 SHOTS
    30 HITS
    19.11%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    RoboTosco
    created 09/13/17 34 code lines fight
    0 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    test
    created 09/13/17 45 code lines fight
    0 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • none
    test
    created 09/13/17 45 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 isScan = false; var fireCount = 0; var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; if (isScan == true) { if (robot.gunCoolDownTime == 0) { //if (robot.gunCoolDownTime == 0 || fireCount < 3) { robot.fire(); //fireCount = fireCount + 1; } else { //isScan = false; //robot.turn(20); robot.ahead(); } } else { robot.ahead(); //robot.rotateCannon(); //robot.back(100); robot.turn(); //robot.rotateCannon(360); //robot.fire(); } }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; //robot.fire(); isScan = true; }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; //robot.turn(ev.bearing); // turn enought to be in a straight // angle with the wall. robot.turn(30); isScan = false; };
  • # 24227
    Tinwor
    created 09/13/17 50 code lines fight fork
    29 SCORE
    2 KILLS
    67 SHOTS
    22 HITS
    32.35%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(1); robot.rotateCannon(20); robot.turn(1); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; var scanned = ev.scannedRobot; robot.stop(); if(scanned.id !== robot.parentId && scanned.parentId !== robot.id) { robot.fire(); robot.rotateCannon(-25); robot.ahead(5); } else { robot.ahead(10); } }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.stop(); if (robot.availableDisappears == 1) { robot.disappear(); robot.turnRight(90); robot.ahead(100); }; robot.turnRight(5); robot.ahead(20); robot.turn(ev.bearing); }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.back(30); }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; robot.back(50); robot.turn(130); };
  • none
    Z-Bot
    created 09/13/17 40 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(r) { }; Robot.prototype.onIdle = function(ev) { var r = ev.robot; r.clone(); r.rotateCannon(360); r.ahead(150); r.turn(30); r.ahead(150); }; Robot.prototype.onScannedRobot = function(ev) { var r = ev.robot; if (ev.scannedRobot.parentId == r.id || ev.scannedRobot.id == r.parentId) { return; }; r.rotateCannon(2); r.fire(); r.turn(8); r.rotateCannon(-20); r.ahead(15); }; Robot.prototype.onHitByBullet = function(ev) { var r = ev.robot; r.disappear(); }; Robot.prototype.onWallCollision = function(ev) { var r = ev.robot; r.back(50); }; Robot.prototype.onRobotCollision = function(ev) { var r = ev.robot; r.back(30); };