Skip to content

Instantly share code, notes, and snippets.

View hale's full-sized avatar

Philip Hale hale

View GitHub Profile
@hale
hale / robot.js
Created December 1, 2012 10:55 — forked from cezarsa/robot.js
Simple Wall Robot
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if (robot.parentId) {