city = CityFactory.createCityByName(cityName); // TODO refactor this as bean
List<IBuilding> buildings = owner.findBuildings(city);
for (IBuilding building : buildings) {
companyValue += building.getValue();
if (building instanceof ITradingOffice){
ITradingOffice office = (ITradingOffice) building;
for (IWare ware : EWare.values()) {
AmountablePrice ap = office.getWare(ware);
companyValue+=ap.getAVGPrice()*ap.getAmount();
}
}
}
} catch (IOException e) {