Skip to content

Instantly share code, notes, and snippets.

@drapello
drapello / robot.js
Created December 5, 2012 12:55 — forked from Shipow/robot.js
0101010101
var Robot = function(robot) {
robot.rotateCannon(-90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead();
//i'll add a clone but i need to refactor collision
//robot.clone();
};
@drapello
drapello / robot.js
Created December 3, 2012 14:13
vaievolta
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
robot.clone();
robot.turn(45);
this.offset = 1;
};
Robot.prototype.onRobotCollision = function(ev) {
var robot = ev.robot;
@drapello
drapello / robot.js
Created December 3, 2012 13:19 — forked from heynemann/robot.js
Merry Go round
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
//robot.clone();
this.robotOptions = {
clone: {
canStartFight: false,
goBackOnCollision: false
@drapello
drapello / robot.js
Created December 1, 2012 02:49 — forked from cezarsa/robot.js
Simple Wall Robot
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) {
@drapello
drapello / robot.js
Created December 1, 2012 02:34 — forked from cezarsa/robot.js
seeker
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
robot.clone();
robot.turn(45);
this.offset = 1;
};
Robot.prototype.onIdle = function(ev) {
@drapello
drapello / robot.js
Created December 1, 2012 02:27 — forked from cezarsa/robot.js
seeker
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
robot.clone();
robot.turn(45);
this.offset = 1;
};
Robot.prototype.onIdle = function(ev) {