MY ROBOTS

ABSOLUTELY EVERYTHING ABOUT YOUR ARMY OF ROBOTS
  • # 24171
    Backup Bot
    created 01/13/17 428 code lines fight
    819 SCORE
    94 KILLS
    1,762 SHOTS
    660 HITS
    37.44%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 3
    Ryah
    created 01/13/17 428 code lines fight
    1739 SCORE
    209 KILLS
    4,442 SHOTS
    1,699 HITS
    38.24%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
  • # 30
    Walls Upgraded v2
    created 01/13/17 48 code lines fight fork
    1594 SCORE
    11 KILLS
    166 SHOTS
    75 HITS
    44.91%
    AVERAGE HITS/SHOT
    SCORE OVER TIME
    var Robot = function(robot) {}; var moveAmount = 0; var doSetup = true; var cloneId = false; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; if(cloneId === false && robot.parentId !== null) { cloneId = robot.id; doSetup = true; robot.turnRight(90); } if(doSetup) { robot.clone(); moveAmount = Math.max(robot.arenaWidth,robot.arenaHeight); robot.turnLeft(robot.angle % 90); robot.turnGunRight(90); doSetup = false; } robot.ahead(moveAmount); }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; var target = ev.collidedRobot; if(target.id !== cloneId && target.id !== robot.parentId) { robot.back(15); robot.turnGunRight(-95); robot.turnGunRight(95); } }; //for fight code game, this way is better :) Robot.prototype.onWallCollision = function(ev) { ev.robot.turnRight(ev.bearing + 90); }; Robot.prototype.onHitByBullet = function(ev) { if(ev.robot.id !== cloneId) ev.robot.disappear(); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; var target = ev.scannedRobot; if(target.id !== cloneId && target.id !== robot.parentId) robot.fire(); };