public class CheapProductionTradeStrategy extends BasePlayerTradeStrategy
| Modifier and Type | Field and Description |
|---|---|
private ch.sahits.game.openpatrician.model.sea.BlockadeState |
blockade |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private org.apache.logging.log4j.Logger |
logger |
private int |
lowMoney |
private MapService |
mapService |
private ShipService |
shipService |
tradeStrategyType| Constructor and Description |
|---|
CheapProductionTradeStrategy() |
| Modifier and Type | Method and Description |
|---|---|
private void |
destroy() |
private Optional<ch.sahits.game.openpatrician.model.city.ICity> |
findNearestCityWithNeed(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.product.IWare ware,
ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
ch.sahits.game.openpatrician.model.city.ICity excludeCity) |
private Optional<ch.sahits.game.openpatrician.model.product.IWare> |
findWareToBuy(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IAIPlayer player) |
void |
handleShipArrivesInPort(ch.sahits.game.openpatrician.model.event.IShipEntersPortEvent event) |
private void |
init() |
void |
initialzeTradeCycle(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel) |
private void |
moveToNextStopEmpty(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
ch.sahits.game.openpatrician.model.city.ICity city) |
addDefaultTradeSteps, append, createAggregatedBuyTradeStep, createAggregatedCheckedBuyTradeStep, createAggregatedDumpStep, createAggregatedSellStep, createCheckAndTakeLoanStep, createCheckRepairStep, createConditionalAggregatedDumpStep, createHireCaptain, createHireSailorStep, createJoinGuildTradeStep, createPaybackLoanStep, createTravelToStep, executeTradeSteps, findCitySupplyingWare, findCityWithAllRequiredWares, findDestinationToBuyRequiredProductionWares, findNextStop, findWaresOfInterest, getLoadedWares, getMostNeededWares, getMostNeededWares, getNextStep, getWaresNeedIn, handleHireSailors, handleRepairFinished, hasMoreTradeSteps, inject, isMatchingTradeStrategy, isNeededprivate final org.apache.logging.log4j.Logger logger
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
@Autowired private ShipService shipService
@Value(value="${aiplayer.money.low}")
private int lowMoney
@Autowired private MapService mapService
@Autowired private ch.sahits.game.openpatrician.model.sea.BlockadeState blockade
@PostConstruct private void init()
@PreDestroy private void destroy()
public void initialzeTradeCycle(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
private void moveToNextStopEmpty(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
ch.sahits.game.openpatrician.model.city.ICity city)
private Optional<ch.sahits.game.openpatrician.model.city.ICity> findNearestCityWithNeed(ch.sahits.game.openpatrician.model.city.ICity city, ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.product.IWare ware, ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel, ch.sahits.game.openpatrician.model.city.ICity excludeCity)
private Optional<ch.sahits.game.openpatrician.model.product.IWare> findWareToBuy(ch.sahits.game.openpatrician.model.city.ICity city, ch.sahits.game.openpatrician.model.IAIPlayer player)
public void handleShipArrivesInPort(ch.sahits.game.openpatrician.model.event.IShipEntersPortEvent event)
Copyright © 2011-2017 Sahits GmbH. All Rights Reserved.