Skip to content

Instantly share code, notes, and snippets.

View apretto's full-sized avatar

Alexandre Pretto Nunes apretto

  • Mojang AB
  • Stockholm, Sweden
View GitHub Profile
@apretto
apretto / robot.js
Created December 12, 2012 21:11 — forked from naab/robot.js
Roger
//FightCode can only understand your robot
//if its class is called Robot
var arena = {
width: 0,
height: 0,
};
var nb_directions = 4;
@apretto
apretto / robot.js
Created December 6, 2012 20:34
Fluffy Unicorn Mk.I
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
var helperFuncs = {
center: function (robot, helper) {
return {x: robot.arenaWidth/2,
@apretto
apretto / robot.js
Created December 6, 2012 16:08 — forked from fwitzke/robot.js
cheater666
var Robot = function(robot) {
robot.rotateCannon(-90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead();
};
function isClone(robot1, robot2) {