19 lines
410 B
JavaScript
19 lines
410 B
JavaScript
function determineNextBlueprint(room){
|
|
return STRUCTURE_EXTENSION;
|
|
}
|
|
|
|
function addBlueprint(room){
|
|
let foundPosition = false;
|
|
let spawn = room.find(FIND_MY_SPAWNS);
|
|
let position = spawn.pos;
|
|
let spiralOffset = 1;
|
|
while(!foundPosition){
|
|
position.y -= spiralOffset++;
|
|
position.x -= spiralOffset++;
|
|
position.y += spiralOffset++;
|
|
position.x += spiralOffset++;
|
|
}
|
|
}
|
|
|
|
module.exports = { addBlueprint }
|