TsarBot/role_base.js

16 lines
297 B
JavaScript

class roleBase{
constructor(){
this.body = [ MOVE, WORK, CARRY ];
this.name = 'Creep';
}
/** @param {Creep} creep **/
run(creep) { }
spawn(spawnPoint){
spawnPoint.spawnCreep(this.body, this.name + Game.time,
{memory : {role : this.name}
});
}
};
module.exports = roleBase;