Skip to content

Instantly share code, notes, and snippets.

@moret
Created December 6, 2012 12:49
Show Gist options
  • Select an option

  • Save moret/4224217 to your computer and use it in GitHub Desktop.

Select an option

Save moret/4224217 to your computer and use it in GitHub Desktop.
turr
var Robot = function(robot) {};
Robot.prototype.onIdle = function(e) {
var r = e.robot;
r.turn();
r.fire();
r.ahead();
};
Robot.prototype.onScannedRobot = function(e) {
var r = e.robot;
r.stop();
r.fire();
r.ahead(50);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment