Skip to content

Instantly share code, notes, and snippets.

@klod76
klod76 / robot.js
Created December 5, 2012 17:05
Zolmeister
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if (robot.parentId) {
robot.ahead(1);
robot.turnGunRight(1);
}
else {
@klod76
klod76 / robot.js
Created December 6, 2012 13:46
MmmMHHmmmm
var Robot = function(robot) {
this.direction = 1;
this.found = 0;
this.speed = 3;
};
Robot.prototype.onIdle = function(ev) {
var r = ev.robot;