Skip to content

Instantly share code, notes, and snippets.

View peterjaric's full-sized avatar
💭
"'><img src=http://jaric.org/sec/img.php?id=github>

Peter Jaric peterjaric

💭
"'><img src=http://jaric.org/sec/img.php?id=github>
View GitHub Profile
@peterjaric
peterjaric / gist:4203320
Created December 4, 2012 12:29 — forked from fabiopimentel/robot.js
Megatron clone
We couldn’t find that file to show.
@peterjaric
peterjaric / robot.js
Created December 4, 2012 13:51
GnuPower
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
robot.rotateCannon(90);
};
state = {shouldTurn: 0, forward: true};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
@peterjaric
peterjaric / robot.js
Created December 5, 2012 13:25
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 {
@peterjaric
peterjaric / robot.js
Created December 5, 2012 20:07
The Tricky Tracker
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
var D = {
enemyIds: [],
enemyPositions: {}
function sendError(message, url, lineNum) {
var i;
// First check the URL and line number of the error
url = url || window.location.href;
lineNum = lineNum || 'None';
// If the error is from these 3rd party script URLs, we ignore
// We could also just ignore errors from all scripts that aren't our own
var scriptURLs = [
alert(1);

Keybase proof

I hereby claim:

  • I am peterjaric on github.
  • I am jaric (https://keybase.io/jaric) on keybase.
  • I have a public key ASCMkx_ixpU-UU970rdJ3Rh1syW1RB8_1OXa7EaAkARN5go

To claim this, I am signing this object:

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE