Interface IAIPlayer

  • All Superinterfaces:
    ICitizen, ICreditor, IPlayer, IShipOwner
    All Known Implementing Classes:
    AIPlayer

    public interface IAIPlayer
    extends IPlayer
    Player interface defining an artificial player.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2011 Created on Sep 17, 2011
    • Method Detail

      • 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 data
        tradeMission - 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.