Skip to content

Instantly share code, notes, and snippets.

@MatthieuBraure
MatthieuBraure / robot.js
Created December 8, 2012 12:40
DeathAng3l2
// Conventions:
// We use angles in degrees in cock-wise fashion
RobotHelpers = {};
MathHelpers = {};
RobotHelpers.cannon_rotation_direction = {};
RobotHelpers.shoot = {};
RobotHelpers.target = {};
RobotHelpers.moving_direction = {};
@MatthieuBraure
MatthieuBraure / robot.js
Created December 8, 2012 12:33 — forked from kjaku/robot.js
Bubu
var Robot = function(robot) {
// var robot = ev.robot;
}
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
robot.rotateCannon(360);
robot.turn(360)
@MatthieuBraure
MatthieuBraure / robot.js
Created December 8, 2012 12:33
DeathAng3l2
// Conventions:
// We use angles in degrees in cock-wise fashion
RobotHelpers = {};
MathHelpers = {};
RobotHelpers.cannon_rotation_direction = {};
RobotHelpers.shoot = {};
RobotHelpers.target = {};
RobotHelpers.moving_direction = {};
@MatthieuBraure
MatthieuBraure / robot.js
Created December 8, 2012 12:33 — forked from KimiTang/robot.js
ShenWei
//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.turn(30);
@MatthieuBraure
MatthieuBraure / robot.js
Created December 8, 2012 12:33 — forked from samelinux/robot.js
Wall Killer
var Robot = function(robot) {
robot.rotateCannon(180);
};
Robot.prototype.onIdle = function(ev) {
ev.robot.back(30);
};
Robot.prototype.onScannedRobot = function(ev) {
ev.robot.fire();
@MatthieuBraure
MatthieuBraure / robot.js
Created December 8, 2012 12:32
Zolmeister
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 ){
@MatthieuBraure
MatthieuBraure / robot.js
Created December 7, 2012 11:46
Zolmeister
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 ){
@MatthieuBraure
MatthieuBraure / robot.js
Created December 6, 2012 20:36 — 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 ){
We couldn’t find that file to show.
@MatthieuBraure
MatthieuBraure / robot.js
Created December 6, 2012 19:41
Taliesin
// helpers
function areEnemies(robot, sighted) {
var sightedIsChild = (robot.id == sighted.parentId);
var sightedIsParent = (robot.parentId == sighted.id);
return !(sightedIsChild || sightedIsParent);
};
function baseStep(robot) {