Class BaseJoinGuildStrategy

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract boolean additionalJoinRequirementsMet​(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city, java.util.Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)
      Additional requirients added by custom strategies.
      void join​(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city)  
      boolean shouldJoin​(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city, java.util.Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)
      Base requirements are: there has to be a guild, not yet a member and enough money to join.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseJoinGuildStrategy

        public BaseJoinGuildStrategy()
    • Method Detail

      • shouldJoin

        public boolean shouldJoin​(ch.sahits.game.openpatrician.model.IAIPlayer player,
                                  ch.sahits.game.openpatrician.model.city.ICity city,
                                  java.util.Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)
        Base requirements are: there has to be a guild, not yet a member and enough money to join.
        Specified by:
        shouldJoin in interface ch.sahits.game.openpatrician.model.player.IAIGuildJoinStrategy
        Parameters:
        player - who should decide on joining
        city - where to join
        vessel - possible vessel in the city
        Returns:
      • additionalJoinRequirementsMet

        protected abstract boolean additionalJoinRequirementsMet​(ch.sahits.game.openpatrician.model.IAIPlayer player,
                                                                 ch.sahits.game.openpatrician.model.city.ICity city,
                                                                 java.util.Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)
        Additional requirients added by custom strategies.
      • join

        public void join​(ch.sahits.game.openpatrician.model.IAIPlayer player,
                         ch.sahits.game.openpatrician.model.city.ICity city)
        Specified by:
        join in interface ch.sahits.game.openpatrician.model.player.IAIGuildJoinStrategy