Class CityProductionConsumptionKnowledge

  • All Implemented Interfaces:
    ch.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledge

    public class CityProductionConsumptionKnowledge
    extends java.lang.Object
    implements ch.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledge
    Model of the knowledge of a player about the production and the consumption of a city.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getConsumptionAmount​(ch.sahits.game.openpatrician.model.product.IWare ware)  
      int getProductionAmount​(ch.sahits.game.openpatrician.model.product.IWare ware)  
      java.util.List<ch.sahits.game.openpatrician.model.product.IWare> getSortedProductionWares()  
      int getStoredAmount​(ch.sahits.game.openpatrician.model.product.IWare ware)  
      void updateConsumption​(ch.sahits.game.openpatrician.model.product.IWare ware, int amount)
      Update the knowledge about the weekly consumed amounts.
      void updateProduction​(ch.sahits.game.openpatrician.model.product.IWare ware, int amount)
      Update the knowlege about the weekly produced amounts.
      void updateStored​(ch.sahits.game.openpatrician.model.product.IWare ware, int amount)
      Update the knowledge about the stored amounts.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CityProductionConsumptionKnowledge

        public CityProductionConsumptionKnowledge()
    • Method Detail

      • updateProduction

        public void updateProduction​(ch.sahits.game.openpatrician.model.product.IWare ware,
                                     int amount)
        Update the knowlege about the weekly produced amounts.
        Parameters:
        ware - that is to be updated in the production
        amount - amount of the ware that is to be updated.
      • getSortedProductionWares

        public java.util.List<ch.sahits.game.openpatrician.model.product.IWare> getSortedProductionWares()
      • getProductionAmount

        public int getProductionAmount​(ch.sahits.game.openpatrician.model.product.IWare ware)
        Specified by:
        getProductionAmount in interface ch.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledge
      • updateConsumption

        public void updateConsumption​(ch.sahits.game.openpatrician.model.product.IWare ware,
                                      int amount)
        Update the knowledge about the weekly consumed amounts.
        Parameters:
        ware - ware that is to be consumed
        amount - amount of the ware that is to be consumed
      • getConsumptionAmount

        public int getConsumptionAmount​(ch.sahits.game.openpatrician.model.product.IWare ware)
        Specified by:
        getConsumptionAmount in interface ch.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledge
      • updateStored

        public void updateStored​(ch.sahits.game.openpatrician.model.product.IWare ware,
                                 int amount)
        Update the knowledge about the stored amounts.
        Parameters:
        ware - that is to be stored
        amount - amount of the ware that is to be stored
      • getStoredAmount

        public int getStoredAmount​(ch.sahits.game.openpatrician.model.product.IWare ware)
        Specified by:
        getStoredAmount in interface ch.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledge