Interface IAICaptainHireStrategy

    • Method Detail

      • shouldHire

        boolean shouldHire​(IAIPlayer player,
                           IShip vessel,
                           ICity city)
        Should player hire captain on the vessel.
        Parameters:
        player - making the decision
        vessel - on which the captain would end up
        city - where the potential captain can be hired.
        Returns:
        true if the captain should be hired
      • getCaptain

        java.util.Optional<ICaptain> getCaptain​(ICity city)
        Retrieve the captain to be hired.
        Parameters:
        city - where the potential captain can be hired.
        Returns:
        Optional captain. Will return empty if there is no captain in the city.
      • hire

        void hire​(IAIPlayer player,
                  IShip vessel,
                  ICaptain captain,
                  ICity city)
        player hires captain on the vessel.
        Parameters:
        player - doing the hiring
        vessel - of the captian
        captain - who is hired.
        city - where the captain is hired.