Class CityProductionConsumptionKnowledge
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.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.ICityProductionConsumptionKnowledgeModel of the knowledge of a player about the production and the consumption of a city.
-
-
Constructor Summary
Constructors Constructor Description CityProductionConsumptionKnowledge()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetConsumptionAmount(ch.sahits.game.openpatrician.model.product.IWare ware)intgetProductionAmount(ch.sahits.game.openpatrician.model.product.IWare ware)java.util.List<ch.sahits.game.openpatrician.model.product.IWare>getSortedProductionWares()intgetStoredAmount(ch.sahits.game.openpatrician.model.product.IWare ware)voidupdateConsumption(ch.sahits.game.openpatrician.model.product.IWare ware, int amount)Update the knowledge about the weekly consumed amounts.voidupdateProduction(ch.sahits.game.openpatrician.model.product.IWare ware, int amount)Update the knowlege about the weekly produced amounts.voidupdateStored(ch.sahits.game.openpatrician.model.product.IWare ware, int amount)Update the knowledge about the stored amounts.
-
-
-
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 productionamount- 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:
getProductionAmountin interfacech.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 consumedamount- amount of the ware that is to be consumed
-
getConsumptionAmount
public int getConsumptionAmount(ch.sahits.game.openpatrician.model.product.IWare ware)
- Specified by:
getConsumptionAmountin interfacech.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 storedamount- amount of the ware that is to be stored
-
getStoredAmount
public int getStoredAmount(ch.sahits.game.openpatrician.model.product.IWare ware)
- Specified by:
getStoredAmountin interfacech.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledge
-
-