Skip to content

Instantly share code, notes, and snippets.

View felipesilva's full-sized avatar

Felipe Silva felipesilva

  • The New York Times
  • New York
View GitHub Profile
@felipesilva
felipesilva / robot.js
Created December 2, 2012 08:50 — 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) {