public class TradeManagerService extends Object
| Modifier and Type | Field and Description |
|---|---|
private ch.sahits.game.openpatrician.model.city.PopulationConsume |
consume |
private ch.sahits.game.openpatrician.model.product.ProductionChain |
productionChain |
private TradeService |
tradeService |
| Constructor and Description |
|---|
TradeManagerService() |
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
calculateBuyAmount(ch.sahits.game.openpatrician.model.product.IWare ware,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IAIPlayer player,
ETradeReason tradeReason,
List<ch.sahits.game.openpatrician.model.building.IWorkShop> workShops) |
private int |
calculateCityNeeds(ch.sahits.game.openpatrician.model.product.IWare ware,
ch.sahits.game.openpatrician.model.city.ICity city) |
(package private) int |
calculateSellAmount(ch.sahits.game.openpatrician.model.product.IWare ware,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IAIPlayer player,
ETradeReason tradeReason,
List<ch.sahits.game.openpatrician.model.building.IWorkShop> workShops)
Calculate the amount of wares that should be retained, when selling.
|
(package private) com.google.common.collect.Multimap<ch.sahits.game.openpatrician.model.product.IWare,ETradeReason> |
collectTradeReasons(List<ch.sahits.game.openpatrician.model.building.IWorkShop> workShops,
ch.sahits.game.openpatrician.model.city.ICity city) |
(package private) Map<ch.sahits.game.openpatrician.model.product.IWare,ETradeReason> |
condense(com.google.common.collect.Multimap<ch.sahits.game.openpatrician.model.product.IWare,ETradeReason> reasons) |
private List<Object[]> |
determineLimits(Map<ch.sahits.game.openpatrician.model.product.IWare,ETradeReason> definiteReasons,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IAIPlayer player,
List<ch.sahits.game.openpatrician.model.building.IWorkShop> workShops) |
private boolean |
hasCentralStorageStrategy(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IAIPlayer player) |
void |
hireSteward(ch.sahits.game.openpatrician.model.building.ITradingOffice tradingOffice)
Hire a steward for the trading office.
|
void |
setupOrUpdateAutomaticTrading(ch.sahits.game.openpatrician.model.building.ITradingOffice office)
Ensure that the automated trading values are up to date.
|
@Autowired private ch.sahits.game.openpatrician.model.product.ProductionChain productionChain
@Autowired private ch.sahits.game.openpatrician.model.city.PopulationConsume consume
@Autowired private TradeService tradeService
public void hireSteward(ch.sahits.game.openpatrician.model.building.ITradingOffice tradingOffice)
tradingOffice - public void setupOrUpdateAutomaticTrading(ch.sahits.game.openpatrician.model.building.ITradingOffice office)
office - private List<Object[]> determineLimits(Map<ch.sahits.game.openpatrician.model.product.IWare,ETradeReason> definiteReasons, ch.sahits.game.openpatrician.model.city.ICity city, ch.sahits.game.openpatrician.model.IAIPlayer player, List<ch.sahits.game.openpatrician.model.building.IWorkShop> workShops)
int calculateSellAmount(ch.sahits.game.openpatrician.model.product.IWare ware,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IAIPlayer player,
ETradeReason tradeReason,
List<ch.sahits.game.openpatrician.model.building.IWorkShop> workShops)
private int calculateCityNeeds(ch.sahits.game.openpatrician.model.product.IWare ware,
ch.sahits.game.openpatrician.model.city.ICity city)
int calculateBuyAmount(ch.sahits.game.openpatrician.model.product.IWare ware,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IAIPlayer player,
ETradeReason tradeReason,
List<ch.sahits.game.openpatrician.model.building.IWorkShop> workShops)
private boolean hasCentralStorageStrategy(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IAIPlayer player)
Map<ch.sahits.game.openpatrician.model.product.IWare,ETradeReason> condense(com.google.common.collect.Multimap<ch.sahits.game.openpatrician.model.product.IWare,ETradeReason> reasons)
com.google.common.collect.Multimap<ch.sahits.game.openpatrician.model.product.IWare,ETradeReason> collectTradeReasons(List<ch.sahits.game.openpatrician.model.building.IWorkShop> workShops, ch.sahits.game.openpatrician.model.city.ICity city)
Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.