Class TradingOfficeRandomShipConstructionSelectionStrategy

    • Field Detail

      • map

        @Autowired
        private IMap map
      • rnd

        @Autowired
        private java.util.Random rnd
      • context

        @Autowired
        private org.springframework.context.ApplicationContext context
    • Constructor Detail

      • TradingOfficeRandomShipConstructionSelectionStrategy

        public TradingOfficeRandomShipConstructionSelectionStrategy()
    • Method Detail

      • getBuildLocation

        public ICity getBuildLocation​(IAIPlayer player)
        Select the build location of the new ship. The build location is always the players hometown.
        Parameters:
        player -
        Returns:
      • initShipConstruction

        public void initShipConstruction​(IAIPlayer player,
                                         INavigableVessel vessel,
                                         EShipType shipType)
        Description copied from interface: IAIConstructionSelectionStrategy
        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.
      • calculateCostructionCity

        ICity calculateCostructionCity​(IAIPlayer player)