Interface IAIPlayer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addTradeStep(ITradeStep tradeStep, INavigableVessel vessel)
Add a new trade step at the end of the list.IAICaptainHireStrategyType
getCaptainHireStrategyType()
Retrieve the type of the strategy to hire captains.IAIConstructionSelectionStrategyType
getConstructionSelectionType()
Retrieve the type of the strategy to use for deciding how to build new ships.IAIEventDecisionStrategyType
getEventDecitionStrategyType()
Retrieve the strategy type for event decission.IAIGuildJoinStrategyType
getGuildJoinStrategyType()
Retrieve the strategy to join guilds.IAIHireSailorsStrategyType
getHireSailorStrategyType()
Retreive the strategy type for hiring the sailors.IAIHireTradeManagerStrategyType
getHireTradeManagerStrategyType()
Retrieve the strategy for hiring and dismissing trade managers.ITradeStep
getNextTradeStep(INavigableVessel vessel)
Retrieve the next trade step that should be executed and remove it from the list.AIPlayerContext
getPlayerContext()
Retrieve the context for this player.IProductionConsumptionKnowledge
getProductionAndConsumptionKnowledge()
Retrieve the knowledge of production and consumption.IAIShipRepairStrategyType
getShipRepairStrategyType()
Retrieve the type of for the ship repair strategy.IAIShipUpgradeStrategyType
getShipUpgradeStrategyType()
Retrieve the strategy type for upgrading ships.IAITakeLoanStrategyType
getTakeLoanStrategyType()
Retrieve the type of the strategy for taking a loan.ITradeMissionData
getTradeMission(INavigableVessel vessel)
Retrieve the trade mission of a given vessel.java.util.List<ITradeStep>
getTradeSteps(INavigableVessel vessel)
Retrieve a copy of the trade steps of the vessel.IAITradeStrategyType
getTradeStrategyType(INavigableVessel vessel)
Retreive the the type of trade strategy.IAIBuyWeaponStrategyType
getWeaponBuyStrategyType()
Retrieve the strategy type for buying weapons.boolean
hasMoreTradeSteps(INavigableVessel vessel)
Check if there are further trade steps.void
injectTradeStep(ITradeStep tradeStep, INavigableVessel vessel)
Inject a trade step at the beinning of the task list for the vesselboolean
isInitialized(INavigableVessel vessel)
Check if the trade strategy for the vessel is initialized.void
setTradeMission(INavigableVessel vessel, ITradeMissionData tradeMission)
Add trade mission data fo a vessel.void
setTradeStrategyType(INavigableVessel vessel, IAITradeStrategyType type)
void
updateTradeWaitingStatus(INavigableVessel vessel, boolean wait)
Update the waiting status upon the execution of a trade step.boolean
waitingForTradeStepToFinish(INavigableVessel vessel)
Check if the next trade step can be executed for the vessel, or if the last trade step requires waiting on an event.-
Methods inherited from interface ch.sahits.game.openpatrician.model.ICitizen
getHometown, getLastName, getName, getRank
-
Methods inherited from interface ch.sahits.game.openpatrician.model.city.ICreditor
receiveSum
-
Methods inherited from interface ch.sahits.game.openpatrician.model.IPlayer
addSelectableVessel, addShip, findBuildings, findBuildings, findShips, findTradingOffice, getCareerLevel, getChildren, getCompany, getCriminalDrive, getFleet, getPersonalData, getSegmentedMap, getSelectableVessels, getSpouseData, getUuid, marry, removeSelectableVessel, removeShip, setCareerLevel, setSegmentedMap, spouseDies, updateCrimialDrive, updateRank
-
Methods inherited from interface ch.sahits.game.openpatrician.model.people.IShipOwner
getLastName, getName
-
-
-
-
Method Detail
-
setTradeStrategyType
void setTradeStrategyType(INavigableVessel vessel, IAITradeStrategyType type)
-
getTradeStrategyType
IAITradeStrategyType getTradeStrategyType(INavigableVessel vessel)
Retreive the the type of trade strategy.- Parameters:
vessel
- for which to retrieve the trade strategy type- Returns:
- trade strategy type for the vessel
-
getShipRepairStrategyType
IAIShipRepairStrategyType getShipRepairStrategyType()
Retrieve the type of for the ship repair strategy.- Returns:
- ship repair strategy type.
-
getTakeLoanStrategyType
IAITakeLoanStrategyType getTakeLoanStrategyType()
Retrieve the type of the strategy for taking a loan.- Returns:
- strategy type to take out a loan
-
getEventDecitionStrategyType
IAIEventDecisionStrategyType getEventDecitionStrategyType()
Retrieve the strategy type for event decission.- Returns:
- strategy type to make event based decissions
-
getConstructionSelectionType
IAIConstructionSelectionStrategyType getConstructionSelectionType()
Retrieve the type of the strategy to use for deciding how to build new ships.- Returns:
- strategy type for construction selection
-
getCaptainHireStrategyType
IAICaptainHireStrategyType getCaptainHireStrategyType()
Retrieve the type of the strategy to hire captains.- Returns:
- strategy type to hire captains
-
getGuildJoinStrategyType
IAIGuildJoinStrategyType getGuildJoinStrategyType()
Retrieve the strategy to join guilds.- Returns:
- strategy type to join guilds
-
getWeaponBuyStrategyType
IAIBuyWeaponStrategyType getWeaponBuyStrategyType()
Retrieve the strategy type for buying weapons.- Returns:
- strategy types to decide to buy weapons
-
getShipUpgradeStrategyType
IAIShipUpgradeStrategyType getShipUpgradeStrategyType()
Retrieve the strategy type for upgrading ships.- Returns:
- strategy type for ship upgrading
-
getHireSailorStrategyType
IAIHireSailorsStrategyType getHireSailorStrategyType()
Retreive the strategy type for hiring the sailors.- Returns:
- strategy type to hire sailors
-
getHireTradeManagerStrategyType
IAIHireTradeManagerStrategyType getHireTradeManagerStrategyType()
Retrieve the strategy for hiring and dismissing trade managers.- Returns:
- strategy type to hire trade managers
-
getProductionAndConsumptionKnowledge
IProductionConsumptionKnowledge getProductionAndConsumptionKnowledge()
Retrieve the knowledge of production and consumption.- Returns:
- global knowledge of production and consumption.
-
getNextTradeStep
ITradeStep getNextTradeStep(INavigableVessel vessel)
Retrieve the next trade step that should be executed and remove it from the list.- Parameters:
vessel
- for which the next trade step should be checked.- Returns:
- next trade step for the vessel
-
getTradeSteps
java.util.List<ITradeStep> getTradeSteps(INavigableVessel vessel)
Retrieve a copy of the trade steps of the vessel.- Parameters:
vessel
- for which the next trade step should be checked.- Returns:
- all trade steps for that vessel
-
hasMoreTradeSteps
boolean hasMoreTradeSteps(INavigableVessel vessel)
Check if there are further trade steps.- Parameters:
vessel
- which should be checked.- Returns:
- true if there are more trade steps defined for vessel
-
addTradeStep
void addTradeStep(ITradeStep tradeStep, INavigableVessel vessel)
Add a new trade step at the end of the list.- Parameters:
vessel
- for which the step should be added.tradeStep
- to be added.
-
getTradeMission
ITradeMissionData getTradeMission(INavigableVessel vessel)
Retrieve the trade mission of a given vessel.- Parameters:
vessel
- for which to get the mission data- Returns:
- trade mission for a specific vessel
-
setTradeMission
void setTradeMission(INavigableVessel vessel, ITradeMissionData tradeMission)
Add trade mission data fo a vessel. If the data is null an existing entry will be removed.- Parameters:
vessel
- for which to set the trade mission datatradeMission
- trade mission meta data
-
injectTradeStep
void injectTradeStep(ITradeStep tradeStep, INavigableVessel vessel)
Inject a trade step at the beinning of the task list for the vessel- Parameters:
vessel
- for which the step should be added.tradeStep
- to be added.
-
waitingForTradeStepToFinish
boolean waitingForTradeStepToFinish(INavigableVessel vessel)
Check if the next trade step can be executed for the vessel, or if the last trade step requires waiting on an event.- Parameters:
vessel
- for which the status should be checked.- Returns:
- true if the next trade step is initiated upon an event.
-
updateTradeWaitingStatus
void updateTradeWaitingStatus(INavigableVessel vessel, boolean wait)
Update the waiting status upon the execution of a trade step.- Parameters:
vessel
- for which the status should be updated.wait
- inicate if the next trade step should wait.
-
isInitialized
boolean isInitialized(INavigableVessel vessel)
Check if the trade strategy for the vessel is initialized.- Parameters:
vessel
- to be checked- Returns:
- true if the trade steps for the vessel are initialized.
-
getPlayerContext
AIPlayerContext getPlayerContext()
Retrieve the context for this player.- Returns:
- global context for the player.
-
-