Class CollectCelebrationWaresStrategy
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.strategy.BasePlayerTradeStrategy
-
- ch.sahits.game.openpatrician.engine.player.strategy.CollectionWaresStrategy
-
- ch.sahits.game.openpatrician.engine.player.strategy.CollectCelebrationWaresStrategy
-
- All Implemented Interfaces:
IAITradeStrategy
public class CollectCelebrationWaresStrategy extends CollectionWaresStrategy
- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on Dec 18, 2016
-
-
Field Summary
Fields Modifier and Type Field Description private ICity
celebrationLocation
private CelebrationService
celebrationService
-
Fields inherited from class ch.sahits.game.openpatrician.engine.player.strategy.BasePlayerTradeStrategy
tradeStrategyType
-
-
Constructor Summary
Constructors Constructor Description CollectCelebrationWaresStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkAllWaresCollected(ICity city, INavigableVessel vessel, CollectWaresMissionData tradeMission, java.util.Optional<ITradingOffice> tradingOffice)
Check if all the required wares are actually collected.protected CollectWaresMissionData
createMissionData(IAIPlayer player)
Provide the mission data for collecting wares.protected IAITradeStrategyType
getStrategyType()
Retrieve the strategy type for this strategy.-
Methods inherited from class ch.sahits.game.openpatrician.engine.player.strategy.CollectionWaresStrategy
handleShipArrivesInPort, initializeTradeCycle
-
Methods inherited from class ch.sahits.game.openpatrician.engine.player.strategy.BasePlayerTradeStrategy
addDefaultTradeSteps, append, createAggregatedBuyTradeStep, createAggregatedCheckedBuyTradeStep, createAggregatedCheckedSellStep, createAggregatedDumpStep, createAggregatedSellStep, createCheckAndTakeLoanStep, createCheckedTransferToOfficeTradeStep, createCheckRepairStep, createConditionalAggregatedDumpStep, createHireCaptain, createHireDismissTradeManagerTradeStep, createHireSailorStep, createJoinGuildTradeStep, createPaybackLoanStep, createTransferToOfficeTradeStep, createTransferToShipTradeStep, createTravelToStep, createUpgradeShipTradeStep, createWeaponBuyTradeStep, executeTradeSteps, findCitySupplyingWare, findCityWithAllRequiredWares, findDestinationToBuyRequiredProductionWares, findNextStopForBuying, findNextStopForSelling, findProvidingWares, findWaresOfInterest, getCityToRestartTradeCycle, getLoadedWares, getMostNeededWares, getMostNeededWares, getNextStep, getWaresNeedIn, handleHireSailors, handleRefitFinished, handleRepairFinished, hasBlockingMission, hasMoreTradeSteps, inject, isMatchingTradeStrategy, isNeeded
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.player.IAITradeStrategy
isSelectable
-
-
-
-
Field Detail
-
celebrationLocation
private ICity celebrationLocation
-
celebrationService
@Autowired private CelebrationService celebrationService
-
-
Method Detail
-
createMissionData
protected CollectWaresMissionData createMissionData(IAIPlayer player)
Description copied from class:CollectionWaresStrategy
Provide the mission data for collecting wares.- Specified by:
createMissionData
in classCollectionWaresStrategy
- Parameters:
player
- wishing to collect wares- Returns:
- mission data for the collection of wares
-
checkAllWaresCollected
protected boolean checkAllWaresCollected(ICity city, INavigableVessel vessel, CollectWaresMissionData tradeMission, java.util.Optional<ITradingOffice> tradingOffice)
Description copied from class:CollectionWaresStrategy
Check if all the required wares are actually collected.- Specified by:
checkAllWaresCollected
in classCollectionWaresStrategy
- Parameters:
city
- for which to check the waresvessel
- for which to check the warestradeMission
- for the vesseltradingOffice
- trading office in the city of the player- Returns:
- true if all wares are collected
-
getStrategyType
protected IAITradeStrategyType getStrategyType()
Description copied from class:CollectionWaresStrategy
Retrieve the strategy type for this strategy.- Specified by:
getStrategyType
in classCollectionWaresStrategy
- Returns:
- AI trade strategy type.
-
-