final class SimplePriceCalculation extends Object implements IPriceCalculation
| Constructor and Description |
|---|
SimplePriceCalculation() |
| Modifier and Type | Method and Description |
|---|---|
double |
computePrice(int min,
int max,
int available,
int saturation,
int productionRate,
IPopulationStructure pop,
ECityState state)
Compute the price for one item of the ware.
|
javafx.beans.binding.DoubleBinding |
computePrice(javafx.beans.property.ReadOnlyIntegerProperty min,
javafx.beans.property.ReadOnlyIntegerProperty max,
javafx.beans.property.IntegerProperty available,
javafx.beans.property.ReadOnlyIntegerProperty saturation,
int productionRate,
IPopulationStructure pop,
ECityState state)
Compute the price for one item of the ware.
|
private javafx.beans.binding.DoubleBinding |
cosinus(javafx.beans.property.IntegerProperty available,
int saturation) |
public double computePrice(int min,
int max,
int available,
int saturation,
int productionRate,
IPopulationStructure pop,
ECityState state)
computePrice in interface IPriceCalculationmin - the lowest possible price (0 exclusive)max - the highest possible priceavailable - amount of wares that are available in the marketsaturation - amount of items at which the market is saturated (no further price changeproductionRate - amount the city can produce within a weekpop - population structure that may have an influence on the calculated pricestate - state of the citypublic javafx.beans.binding.DoubleBinding computePrice(javafx.beans.property.ReadOnlyIntegerProperty min,
javafx.beans.property.ReadOnlyIntegerProperty max,
javafx.beans.property.IntegerProperty available,
javafx.beans.property.ReadOnlyIntegerProperty saturation,
int productionRate,
IPopulationStructure pop,
ECityState state)
min - the lowest possible price (0 exclusive)max - the highest possible priceavailable - amount of wares that are available in the marketsaturation - amount of items at which the market is saturated (no further price changeproductionRate - amount the city can produce within a weekpop - population structure that may have an influence on the calculated pricestate - state of the cityprivate javafx.beans.binding.DoubleBinding cosinus(javafx.beans.property.IntegerProperty available,
int saturation)
Copyright © 2011-2016 Sahits GmbH. All Rights Reserved.