Skip to content

Instantly share code, notes, and snippets.

View Ghabriel's full-sized avatar

Ghabriel Nunes Ghabriel

  • 04:43 (UTC -03:00)
View GitHub Profile
@Ghabriel
Ghabriel / robot.js
Created December 5, 2012 03:23
Robot04
//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);
@Ghabriel
Ghabriel / robot.js
Created December 4, 2012 19:32 — forked from mwclarkson/robot.js
Out Of Cheese Error v2.0
//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(90);
@Ghabriel
Ghabriel / robot.js
Created December 4, 2012 15:59
Coolbot 9000
//FightCode can only understand your robot
//if its class is called Robot
var id;
var Robot = function(robot) {
id = this.id;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
@Ghabriel
Ghabriel / robot.js
Created December 4, 2012 01:03
Robot03
//FightCode can only understand your robot
//if its class is called Robot
var id,
Robot = function(robot) {
id = this.id;
},
hasTarget = false,
time = 0;
@Ghabriel
Ghabriel / robot.js
Created December 4, 2012 00:58
Robot02
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
},
hasTarget = false,
emergency = false;
Robot.prototype.onIdle = function(ev) {
@Ghabriel
Ghabriel / robot.js
Created December 3, 2012 23:26
Robot01
//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(30);