Skip to content

Instantly share code, notes, and snippets.

@sivartydrup
sivartydrup / IOBOT v1.2
Created January 17, 2013 12:23
Next iteration
var Robot = function(robot) {
robot.rotateCannon(90);
};
Robot.prototype.onIdle = function(ev) {
ev.robot.clone();
if (ev.robot.parentId !== null) {
ev.robot.turn(-90);
ev.robot.rotateCannon(3);
@sivartydrup
sivartydrup / IOBOT v1.1
Last active December 11, 2015 05:38
Next iteration
var Robot = function(robot) {
robot.rotateCannon(90);
};
Robot.prototype.onIdle = function(ev) {
ev.robot.clone();
if (ev.robot.parentId !== null) {
ev.robot.turn(90);
ev.robot.rotateCannon(3);
ev.robot.rotateCannon(30);
@sivartydrup
sivartydrup / IOBOT
Last active October 29, 2018 15:45
AI bot for fightcodegame.com
var Robot = function(robot) {
robot.rotateCannon(90);
};
Robot.prototype.onIdle = function(ev) {
ev.robot.clone();
ev.robot.ahead(1000);
if (ev.robot.parentId !== null) {
ev.robot.rotateCannon(3);
ev.robot.rotateCannon(30);