...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
// iHave(structureTypeOrID) returns true if you have at least one of those structures fully built
var iHave = (function(){
var buildingIsBuilt = function(building) {
return building.status == BUILT;
}
return function (structure) {
var list = enumStruct(me,structure);
return list.some(buildingIsBuilt);
}
})(); |
...