Skip to content

Instantly share code, notes, and snippets.

@gdborton
Created February 23, 2016 19:08
Show Gist options
  • Save gdborton/40596f97d5d4da713e11 to your computer and use it in GitHub Desktop.
Save gdborton/40596f97d5d4da713e11 to your computer and use it in GitHub Desktop.
class BetterCreep extends Creep {
constructor(creep) {
this._creep = creep;
}
work() {
this._creep.moveTo();
}
}
Object.keys(Game.creeps).forEach((creepName) => {
const betterCreep = new BetterCreep(Game.creeps[creepName]);
betterCreep.work();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment