Skip to content

Instantly share code, notes, and snippets.

View karlthepagan's full-sized avatar

Karl the Pagan karlthepagan

View GitHub Profile
@karlthepagan
karlthepagan / Traveler.js
Created February 21, 2017 12:31 — forked from semperrabbit/Traveler.js
Traveler.js
/**
* To start using Traveler, require it in main.js:
*
* There are 6 options available to pass to the module. Options are passed in the form
* of an object with one or more of the following:
*
* exportTraveler: boolean Whether the require() should return the Traveler class. Defaults to true.
* installTraveler: boolean Whether the Traveler class should be stored in `global.Traveler`. Defaults to false.
* installPrototype: boolean Whether Creep.prototype.travelTo() should be created. Defaults to true.
* hostileLocation: string Where in Memory a list of hostile rooms can be found. If it can be found in
@karlthepagan
karlthepagan / Traveler.js
Last active February 21, 2017 21:08 — forked from bonzaiferroni/Traveler.js
Traveler.js
/**
* To start using Traveler, require it in main.js:
* Example: var Traveler = require('Traveler.js');
*
* Check the footer of this file for suggestions on how to access it at various scopes
*
*/
"use strict";
const REPORT_CPU_THRESHOLD = 50;
const DEFAULT_MAXOPS = 20000;