Skip to content

Instantly share code, notes, and snippets.

@matarek
matarek / robot.js
Created December 4, 2012 13:09
TANKAR
//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.ahead(100);
if (Math.random() > 0.5) {