MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 23401
    test
    created 05/19/17 45 code lines fight fork
    1494 SCORE
    0 KILLS
    8 SHOTS
    2 HITS
    22.22%
    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; };

LATEST COMBATS

WATCH THE LAST COMBATS OF THIS PLAYER'S ARMY