Skip to content

Instantly share code, notes, and snippets.

@glanau
glanau / gist:4232336
Created December 7, 2012 10:20 — forked from baptistedeleplace/robot.js
GunpowderBot
We couldn’t find that file to show.
@glanau
glanau / robot.js
Created December 7, 2012 08:59
THE destroyer
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.rotateCannon(360);
robot.ahead(50);
robot.turn(30);