Ejemplo n.º 1
0
 public Geometry drawWorkGeometry() {
   if (!this.workBuilding2size.isEmpty()) {
     return MathHelpers.draw(this.workBuilding2size, this.workBuildingSizeSum, this.rnd)
         .getGeometry();
   } else {
     Logger.getLogger(this.getClass().getName())
         .warning(
             "Could not fine work building  in zone "
                 + this.zoneId
                 + "; falling back to zone geometry.");
     return this.getGeometry();
   }
 }
Ejemplo n.º 2
0
 public Geometry drawHomeGeometry(final String buildingType) {
   if (VILLA.equals(buildingType) && !this.villas.isEmpty()) {
     return this.villas.get(this.rnd.nextInt(this.villas.size())).getGeometry();
   } else if (APARTMENT.equals(buildingType) && !this.apartmentBuilding2size.isEmpty()) {
     return MathHelpers.draw(this.apartmentBuilding2size, this.apartmentBuildingSizeSum, this.rnd)
         .getGeometry();
   } else {
     Logger.getLogger(this.getClass().getName())
         .warning(
             "Could not fine home building of type "
                 + buildingType
                 + " in zone "
                 + this.zoneId
                 + "; falling back to zone geometry.");
     return this.getGeometry();
   }
 }