Class ProductionChain
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.product.ProductionChain
-
@Service @Lazy @DependentInitialisation(StartNewGameBean.class) public class ProductionChain extends java.lang.Object
Model for the production chain. All values refer to one workshop with peak efficiency and efficient production.- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on May 14, 2016
-
-
Constructor Summary
Constructors Constructor Description ProductionChain()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetProduction(IWare ware)doublegetRequiredAmount(IWare wareToBeProduced, IWare requiredWare)Get the required amount ofrequiredWareto producewareToBeProducedwithin a week.java.util.List<IWare>getRequiredWares(IWare wareToBeProduced)java.util.List<IWare>getWaresWithProductionChain()Retrieve all wares that require other wares to be produced.
-
-
-
Method Detail
-
getProduction
public double getProduction(IWare ware)
-
getRequiredAmount
public double getRequiredAmount(IWare wareToBeProduced, IWare requiredWare)
Get the required amount ofrequiredWareto producewareToBeProducedwithin a week.- Parameters:
wareToBeProduced- ware that should be producedrequiredWare- ware that is required- Returns:
- amount of
requiredWareto producewareToBeProducedwithin a week.
-
getWaresWithProductionChain
public java.util.List<IWare> getWaresWithProductionChain()
Retrieve all wares that require other wares to be produced.- Returns:
- List of wares that are produced in a production chain.
-
-