Skip to content

Instantly share code, notes, and snippets.

View khepin's full-sized avatar

Sebastien Armand khepin

  • San Francisco, USA
View GitHub Profile
@khepin
khepin / robot.js
Created December 7, 2012 03:10 — forked from f6p/robot.js
NecroBadger
// helpers
function areEnemies(robot, sighted) {
var sightedIsChild = (robot.id == sighted.parentId);
var sightedIsParent = (robot.parentId == sighted.id);
return !(sightedIsChild || sightedIsParent);
};
function baseStep(robot) {