Class TavernEngine

    • Constructor Detail

      • TavernEngine

        public TavernEngine()
    • Method Detail

      • getChildren

        public java.util.List<AbstractEngine> getChildren()
        Description copied from class: AbstractEngine
        Any engine may hold various child engines. This is the way to retrieve them. If there are no child engines, return an empty list. Subclasses have to implement this in the proper way.
        Specified by:
        getChildren in class AbstractEngine
        Returns:
        list of child engines.
      • init

        @PostConstruct
        private void init()
      • unregister

        @PreDestroy
        private void unregister()
      • computeNumbersOfSailors

        private int computeNumbersOfSailors​(ICity city)
      • handlePersonsBecomingAbsent

        private void handlePersonsBecomingAbsent​(TavernState state)
        Randomized state update for persons that are not present.
      • handlePersonsBecomingPresent

        private void handlePersonsBecomingPresent​(ICity city,
                                                  TavernState state)
        Randomized state update for persons that are present.
      • updateWareNeedOrSurplus

        private void updateWareNeedOrSurplus​(int val,
                                             IInformant informant)
      • updateCityRelatedPersons

        void updateCityRelatedPersons​(ITavernPerson person,
                                      ICity city)
      • fillDestinations

        private void fillDestinations​(ICity city,
                                      ICity[] destinations)
      • isAnnotatedType

        private boolean isAnnotatedType​(ITavernPerson person,
                                        java.lang.Class annotation)