Interface BaseProduction

    • Method Detail

      • getBaseProduction

        default int getBaseProduction​(ProductionType productionType,
                                      GoodsType goodsType,
                                      UnitType unitType)
        Get the base production of a given goods type for an optional unit type.
        Parameters:
        productionType - An optional ProductionType to use, if null the best available one is used.
        goodsType - The GoodsType to produce.
        unitType - An optional UnitType that is to do the work, if null the unattended production is considered.
        Returns:
        The amount of goods produced.
      • getAvailableProductionTypes

        java.util.List<ProductionType> getAvailableProductionTypes​(boolean unattended)
        At the interface level, this code is here simply to let the getBaseProduction(ProductionType, GoodsType, UnitType) method know to reference the subclass's method.
        Parameters:
        unattended - Whether the production is unattended.
        Returns:
        A list of ProductionTypes.