Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Firvagor
Firvagor / robot.js
Created December 4, 2012 14:59 — forked from Walko/robot.js
Sperminator
//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(1);
@Firvagor
Firvagor / robot.js
Created December 4, 2012 14:56
W00t #1 YEAH!!!! (Zolmesiter)
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
//robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if (robot.parentId) {
@Firvagor
Firvagor / robot.js
Created December 4, 2012 14:55
Firvagor
//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(10);