Skip to content

Instantly share code, notes, and snippets.

@lekoder
Created December 4, 2012 15:50

Revisions

  1. lekoder created this gist Dec 4, 2012.
    18 changes: 18 additions & 0 deletions robot.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@

    //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.turn(10);
    robot.rotateCannon(10);
    };

    Robot.prototype.onScannedRobot = function(ev) {

    };