let initroom = { run: function(name) { console.log('Initing room ' + name) Game.rooms[name].memory.phase=0 Game.rooms[name].memory.CreepNum=0 Game.rooms[name].memory.minbuildpct=-1 Game.rooms[name].memory.minupgradepct=.5 Game.rooms[name].memory.minrepairpct=.5 Game.rooms[name].memory.hasbeeninited=1 Game.rooms[name].memory.tickssofar=0 Game.rooms[name].memory.maphits={} //Game.rooms[name].memory.minablepositions= this.checkminablepositions(name) let mineralminablepositions = 0 let minerals = Game.rooms[name].find(FIND_MINERALS); for(let i = 0;i o[LOOK_TERRAIN] !== 'wall'); return walkable.length; } } module.exports = initroom