Skip to content

Instantly share code, notes, and snippets.

@satansfate
satansfate / robot.js
Created December 5, 2012 17:42
SatansFate
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
var location = 0;
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if(location == 0){
@satansfate
satansfate / robot.js
Created December 5, 2012 17:42
SatansFate
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
var status = 0//0 = searching, 1 = found
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if(status== 0){
robot.rotateCannon(1);
@satansfate
satansfate / robot.js
Created December 5, 2012 17:58
Attempted Random
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
var angle = 0;
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;