public interface IWare extends IAmountable
MAX: the maximum price for the item if it is not available in the market.
Here the function has a glitch for the buy price: If no item is available
it cannot be sold and the price is therefore 0 (infinity would be logical correct
but is not very understandable in the game context).MIN: the minimal price of the item if more than SATURATION items
are available in the market. As more items are available in the market the price approaches
this value asymptoticly.SATURATION: amount of items when the the need is fullfilled. If there are more items
available in the market than needed all have the MIN price. This is a further
simplification because the price normally drops further if there are much more items available.
The curve would bee leveling out at SATURATION and then dropping further.ABS_MIN: the absolut minimum is the minimal sell price at SATURATION.(MAX-MIN)*(MIN+1) --------------------- + ABS_MIN ex*15/(SATURATION*2)+MIN
| Modifier and Type | Method and Description |
|---|---|
int |
buyPrice(javafx.beans.property.IntegerProperty availableAmount,
javafx.beans.binding.IntegerBinding amountToBuy)
Compute the price for the wares to be bought.
|
int |
computeBuyPrice(int availableAmount,
int amountToBuy)
Deprecated.
|
int |
computeSellPrice(int availableAmount,
int amountToSell)
Deprecated.
|
int |
getMarketSaturation()
Retrieve the amount of units which is considered infinite.
|
int |
getMaxValueBuy()
Retrieve the value that is maximal payed for one unit of this ware
if no ware is available.
|
int |
getMaxValueSell()
Retrieve the value that is to be maximally payed for one unit of this ware if no ware is available.
|
int |
getMinValueBuy()
Retrieve the value of the minimal payed sum for on unit if an infinitly amount
of the ware exists.
|
int |
getMinValueSell()
Retrieve the value that has to be minimally payed sum for one unit if infinitly amount of
wares exist.
|
short |
getSizeAsBarrels()
Retrieve the size of the ware converted into the smallest size unit (barrels)
|
boolean |
isBarrelSizedWare()
Check if the ware size is barrel or not.
|
String |
name()
As this interface is implemented by an enumeration add this method
|
int |
sellPrice(javafx.beans.property.IntegerProperty availableAmount,
javafx.beans.binding.IntegerBinding amountToSell)
Compute the price for the wares to be sold.
|
int getMaxValueBuy()
int getMinValueBuy()
int getMinValueSell()
int getMaxValueSell()
@Deprecated int computeSellPrice(int availableAmount, int amountToSell)
getMaxValueBuy()
and approaches getMinValueBuy() assymtotically.availableAmount - Amount of the ware that is availableamountToSell - Amount of ware that is to be sold@Deprecated int computeBuyPrice(int availableAmount, int amountToBuy)
getMaxValueBuy()
plus a ware specific constant.availableAmount - Amount of the ware that is availableamountToBuy - Amount of ware that is to be boughtshort getSizeAsBarrels()
boolean isBarrelSizedWare()
int getMarketSaturation()
String name()
int sellPrice(javafx.beans.property.IntegerProperty availableAmount,
javafx.beans.binding.IntegerBinding amountToSell)
getMaxValueBuy()
and approaches getMinValueBuy() asymtotically.availableAmount - Amount of the ware that is availableamountToSell - Amount of ware that is to be soldint buyPrice(javafx.beans.property.IntegerProperty availableAmount,
javafx.beans.binding.IntegerBinding amountToBuy)
getMaxValueBuy()
plus a ware specific constant.availableAmount - Amount of the ware that is availableamountToBuy - Amount of ware that is to be boughtCopyright © 2011-2015 Sahits GmbH. All Rights Reserved.