Skip to content

Instantly share code, notes, and snippets.

@LasoR
LasoR / robot.js
Created December 4, 2012 19:49 — forked from dlomibao/robot.js
Shaking cannon
//FightCode can only understand your robot
//if its class is called Robot
var go=120;
var Robot = function(robot) {
};
@LasoR
LasoR / robot.js
Created December 4, 2012 17:19
Plasma02
//FightCode can only understand your robot
//if its class is called Robot
var faund = false;
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
@LasoR
LasoR / robot.js
Created December 4, 2012 16:09
PlasmaBot
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);
robot.back(100);