MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • none
    CANT TOUCH THIS
    created 11/20/13 40 code lines fight
    1500 SCORE
    0 KILLS
    0 SHOTS
    0 HITS
    0.00%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 449
    Dr. Dree
    created 11/20/13 0 code lines fight fork
    1528 SCORE
    3 KILLS
    39 SHOTS
    21 HITS
    52.50%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var Robot = function(robot) { this.turnToRight = true; this.invertedDirection = false; }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; if(this.turnToRight == true) { robot.turn(5); } else { robot.turn(-5); } if(this.invertedDirection == true) { robot.back(10); } else { robot.ahead(10); } }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; var collidedRobot = ev.collidedRobot; if (robot.id == collidedRobot.parentId || robot.parentId == collidedRobot.id) { robot.turn(-10); return; } //this.invertedDirection = true; }; Robot.prototype.onWallCollision = function(ev) { var robot = ev.robot; if(ev.bearing > 0 && this.invertedDirection == false) { this.turnToRight = false; } else { this.turnToRight = true; } robot.ahead(); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; var scannedRobot = ev.scannedRobot; if (robot.id == scannedRobot.parentId || robot.parentId == scannedRobot.id) { return; } if(scannedRobot.position.x > 0 ) { this.turnToRight = true; } else { this.turnToRight = false; } robot.stop() robot.clone(); robot.fire(); robot.ahead(100); }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.ahead(100); };
  • # 728
    TornatoBot
    created 11/18/13 50 code lines fight
    1514 SCORE
    16 KILLS
    348 SHOTS
    120 HITS
    34.38%
    AVERAGE HITS/SHOT
    SCORE OVER TIME