Skip to content

Instantly share code, notes, and snippets.

@michal-gil
michal-gil / robot.js
Created December 4, 2012 15:16 — forked from fabiopimentel/robot.js
[CAELUM TEAM]Megatron
//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.clone();
@michal-gil
michal-gil / robot.js
Created December 4, 2012 15:14 — forked from nargil/robot.js
Cylonica
function clone(obj) {
if (null == obj || "object" != typeof obj) return obj;
var copy = obj.constructor();
for (var attr in obj) {
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];
}
return copy;
}
var Robot = function(robot) {
@michal-gil
michal-gil / robot.js
Created December 4, 2012 14:42 — forked from fabiopimentel/robot.js
[CAELUM TEAM]Megatron
//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.clone();
@michal-gil
michal-gil / robot.js
Created December 4, 2012 14:40 — forked from randompast/robot.js
QR-bot-009
//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()
};
@michal-gil
michal-gil / robot.js
Created December 4, 2012 14:35 — forked from Deeerp/robot.js
RozKurw
//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;