Skip to content

Instantly share code, notes, and snippets.

View demetriusnunes's full-sized avatar

demetriusnunes demetriusnunes

  • OLX
  • Rio de Janeiro, Brazil
View GitHub Profile
@demetriusnunes
demetriusnunes / robot.js
Created December 10, 2012 20:53 — forked from p7o/robot.js
Gunkerzer
//FightCode can only understand your robot
//if its class is called Robot
var direction = 1;
var moveStep = 7;
var rotateStep = 1;
var initialized = false;
var noScanCount = 0;
@demetriusnunes
demetriusnunes / robot.js
Created December 3, 2012 13:01
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) {