Skip to content

Instantly share code, notes, and snippets.

View marcinkunert's full-sized avatar

Marcin Kunert marcinkunert

  • JavaStart
  • Wroclaw, Poland
View GitHub Profile
@marcinkunert
marcinkunert / robot.js
Created December 6, 2012 16:17
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 {
@marcinkunert
marcinkunert / robot.js
Created December 5, 2012 13:52
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 {
var found = false;
var angle = 0;
var cloned = false;
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};