Skip to content

Instantly share code, notes, and snippets.

@nrako
nrako / robot.js
Created December 18, 2012 21:00 — forked from jaskolek/robot.js
jaskolek
var robots = new Array();
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.start = function( ev ){
@nrako
nrako / robot.js
Created December 9, 2012 20:14
DeathAng3l2
// Conventions:
// We use angles in degrees in cock-wise fashion
RobotHelpers = {};
MathHelpers = {};
RobotHelpers.cannon_rotation_direction = {};
RobotHelpers.shoot = {};
RobotHelpers.target = {};
RobotHelpers.moving_direction = {};
@nrako
nrako / robot.js
Created December 6, 2012 12:16
Zolmeister
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 {
@nrako
nrako / robot.js
Created December 5, 2012 22:01 — forked from Shipow/robot.js
test#01
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();
};