function findTerrain(spawn){
if (spawn.room.memory.swamps){
return;
}
var terrain = spawn.room.lookForAtArea('terrain', 1, 1, 48, 48);
var plains = [];
var swamps = [];
_.each(terrain, function(col, y){
_.each(col, function(cell, x){
if (cell == 'swamp'){
swamps.push(""+ x + "_" + y);
}
if (cell == 'plain'){
plains.push(""+ x + "_" + y);
}
});
});
spawn.room.memory.swamps = swamps;
spawn.room.memory.plains = plains;
}