Skip to content

Instantly share code, notes, and snippets.

@bchoii
bchoii / robot.js
Created December 6, 2012 11:45 — forked from Lask0vic/robot.js
Control
var Robot = function(robot) {
//\ robot.clone();
// this.mode = 'scanning';
};
var mode = 'scanning';
var targetVector = 0;
var lastFired = 0;
var iteration = 0;
@bchoii
bchoii / robot.js
Created December 7, 2012 09:32 — forked from alustau/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) {