public class AggregatedBuyTradingOfficeTradeStep extends Object implements ch.sahits.game.openpatrician.model.product.ITradeStep
| Modifier and Type | Field and Description |
|---|---|
private ch.sahits.game.openpatrician.model.city.ICity |
city |
private org.springframework.context.ApplicationContext |
context |
private ArrayList<BuyTradingOfficeTradeStep> |
tradeSteps |
private ch.sahits.game.openpatrician.model.building.ITradingOffice |
tradingOffice |
| Constructor and Description |
|---|
AggregatedBuyTradingOfficeTradeStep() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBuyStep(ch.sahits.game.openpatrician.model.product.IWare ware,
int maxPrice) |
boolean |
execute() |
private List<BuyTradingOfficeTradeStep> |
getPriorityList()
Sort the list of wares that should be bought so that the
wares with the least amount are at the begining of the list.
|
String |
toString() |
private ch.sahits.game.openpatrician.model.city.ICity city
private ch.sahits.game.openpatrician.model.building.ITradingOffice tradingOffice
@Autowired private org.springframework.context.ApplicationContext context
private ArrayList<BuyTradingOfficeTradeStep> tradeSteps
public void addBuyStep(ch.sahits.game.openpatrician.model.product.IWare ware,
int maxPrice)
private List<BuyTradingOfficeTradeStep> getPriorityList()
public boolean execute()
execute in interface ch.sahits.game.openpatrician.model.product.ITradeStepCopyright © 2011-2017 Sahits GmbH. All Rights Reserved.