Skip to content

Instantly share code, notes, and snippets.

View bobmatnyc's full-sized avatar

Robert Matsuoka bobmatnyc

View GitHub Profile
@bobmatnyc
bobmatnyc / robot.js
Created December 5, 2012 07:08
Bobot
function Robot(robot) {}
// well, we need to do something...
// whenever our robot is idle, this method gets called.
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
robot.ahead(150);
robot.rotateCannon(360);
@bobmatnyc
bobmatnyc / robot.js
Created December 6, 2012 20:41 — forked from Ghabriel/robot.js
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;
@bobmatnyc
bobmatnyc / robot.js
Created December 6, 2012 20:38 — forked from oidoug/robot.js
KB1
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();
};
@bobmatnyc
bobmatnyc / robot.js
Created December 6, 2012 20:40 — forked from fantasmag0ria/robot.js
DESTROJER 2.0
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.rotateCannon(5);
robot.ahead(5);
};
Robot.prototype.onScannedRobot = function(ev) {
@bobmatnyc
bobmatnyc / robot.js
Created December 6, 2012 20:41 — forked from Ghabriel/robot.js
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;
@bobmatnyc
bobmatnyc / robot.js
Created December 6, 2012 20:56 — forked from EdiJoe/robot.js
KillbotXR
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
robot.clone();
};
scan = false;
count = 0;
rotate = 2;
hit_count = 0;
cur_bearing = 0;
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
var rx = robot.position.x;
var ry = robot.position.y;
var aH = robot.arenaHeight;
var aW = robot.arenaWidth;
robot.clone()
};
@bobmatnyc
bobmatnyc / robot.js
Created December 6, 2012 21:31
Cat The Murderer
function Robot(robot) {}
// well, we need to do something...
// whenever our robot is idle, this method gets called.
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
robot.ahead(10);
robot.rotateCannon(15);
robot.turn(5);
@bobmatnyc
bobmatnyc / robot.js
Created December 6, 2012 23:58 — forked from folkien/robot.js
Folkien TT2
var direction;
var start;
var runaway;
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
if(robot.parentId){
direction = 1;
@bobmatnyc
bobmatnyc / robot.js
Created December 8, 2012 19:14 — forked from palerique/robot.js
0P3C - Palerique
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if (robot.parentId) {
robot.ahead(1);
robot.turnGunRight(1);
}
else {