Interface IAIConstructionSelectionStrategy

    • Method Detail

      • shouldOrderNewConstruction

        boolean shouldOrderNewConstruction​(IAIPlayer player)
        Check if a new ship should be ordered.
        Parameters:
        player - for which the check should be done.
        Returns:
        true if a new ship should be ordered.
      • shouldBuildShipType

        EShipType shouldBuildShipType​(IAIPlayer player)
        Select the ship type to be built.
        Parameters:
        player - who whishes to build a ship
        Returns:
        ship type that should be ordered
      • getBuildLocation

        ICity getBuildLocation​(IAIPlayer player)
        Select the build location of the new ship.
        Parameters:
        player - who whishes to build a ship
        Returns:
        city in which to order the new ship
      • initShipConstruction

        void initShipConstruction​(IAIPlayer player,
                                  INavigableVessel vessel,
                                  EShipType shipType)
        Initialize the ship construction by collecting the wares. This boils down to selecting the correct implementation of CollectConstructionWareStrategy. Once the ware is collected and delivered to the built location the order must be issued. This happens in the AIPlayerEngine
        Parameters:
        player - for whom to build the ship
        vessel - vessel chosen to collect the wares
        shipType - type of the ship to be built.
      • selectCollectingVessel

        java.util.Optional<INavigableVessel> selectCollectingVessel​(IAIPlayer player,
                                                                    EShipType shipType)
        Find a vessel that will do the collection.
        Parameters:
        player - owning the vessel
        shipType - of the ship to be built and thereby the definition of the required wares.
        Returns:
        vessel that is to be used for collecting the wares.