Class BaseHireCaptainStrategy

    • Field Detail

      • captainsState

        @Autowired
        protected CaptainsState captainsState
      • clientServerEventBus

        @Qualifier("serverClientEventBus")
        @Autowired
        private com.google.common.eventbus.AsyncEventBus clientServerEventBus
    • Constructor Detail

      • BaseHireCaptainStrategy

        public BaseHireCaptainStrategy()
    • Method Detail

      • getCaptain

        public java.util.Optional<ICaptain> getCaptain​(ICity city)
        Description copied from interface: IAICaptainHireStrategy
        Retrieve the captain to be hired.
        Specified by:
        getCaptain in interface IAICaptainHireStrategy
        Parameters:
        city - where the potential captain can be hired.
        Returns:
        Optional captain. Will return empty if there is no captain in the city.