| Modifier and Type | Field and Description |
|---|---|
private ITransferableJFX |
transfer |
private ch.sahits.game.openpatrician.model.product.IWare |
ware |
| Constructor and Description |
|---|
City2ShipJFXAction(ch.sahits.game.openpatrician.model.product.IWare ware,
ITransferableJFX transfer) |
| Modifier and Type | Method and Description |
|---|---|
(package private) javafx.util.Pair<Integer,Integer> |
calculateAffordableAmount(long cash,
int desiredAmount,
int avgPrice,
int availableAmountCity)
Calculate how much can be bought due to monetary restrictions.
|
void |
run() |
private final ch.sahits.game.openpatrician.model.product.IWare ware
private final ITransferableJFX transfer
public City2ShipJFXAction(ch.sahits.game.openpatrician.model.product.IWare ware,
ITransferableJFX transfer)
javafx.util.Pair<Integer,Integer> calculateAffordableAmount(long cash, int desiredAmount, int avgPrice, int availableAmountCity)
cash - available cashdesiredAmount - amount that is desired to be boughtavgPrice - average price for an item when buying the whole amount.availableAmountCity - amount of the ware available in the cityCopyright © 2011-2016 Sahits GmbH. All Rights Reserved.