Package ch.sahits.game.openpatrician.model.city

Examples of ch.sahits.game.openpatrician.model.city.PopulationConsume


   * @param ware Reference to the ware
   * @return amount all the citizens consume of that ware
   */
  private int computeCitizenConsumtion(DisplayImageDIResolver resolver,
      ICity city, EWare ware) {
    PopulationConsume consumer = resolver.getPolulanceConsumtion();
    double amount = consumer.getNeed(ware, EPopulationClass.POOR, city.getPopulation(EPopulationClass.POOR));
    amount += consumer.getNeed(ware, EPopulationClass.MEDIUM, city.getPopulation(EPopulationClass.MEDIUM));
    amount += consumer.getNeed(ware, EPopulationClass.RICH, city.getPopulation(EPopulationClass.RICH));
    int value = (int) Math.rint(amount);
    return value;
  }
View Full Code Here

TOP

Related Classes of ch.sahits.game.openpatrician.model.city.PopulationConsume

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.