Class ClientTaskFactory

    • Field Detail

      • context

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

      • ClientTaskFactory

        public ClientTaskFactory()
    • Method Detail

      • getOpponentsOrder

        public OpponentsOrder getOpponentsOrder​(IPlayer opponent,
                                                IPlayer client,
                                                IPlayer player,
                                                int premium)
        Retrieve the oponents order.
        Parameters:
        opponent - player
        client - who gives the order
        player - the order executor
        premium - on successful execution
        Returns:
        Order of the opponent
      • getConcurrentReconciliation

        public TimedTask getConcurrentReconciliation()
        Retrieve the concurrent reconsiliation timer task.
        Returns:
        reconciliation task
      • getBuyWares

        public TimedTask getBuyWares​(ICityPlayerProxyJFX cityPlayerProxy,
                                     IBuyer buyer)
        Retrieve the timed task for buying wares.
        Parameters:
        cityPlayerProxy - proxy instance
        buyer - client
        Returns:
        task to buy wares
      • getDelayedCaughtAction

        public IDelayedCaughtAction getDelayedCaughtAction​(IPlayer player,
                                                           ICity where)
        Retrieve the delayed caught timed task.
        Parameters:
        player - that is caught
        where - city where the player is caught
        Returns:
        delayed action of being caught
      • getBreakInAction

        public IBreakInAction getBreakInAction​(IPlayer opponent)
        Retrieve the task for breaking in into an opponents office.
        Parameters:
        opponent - .
        Returns:
        break in action
      • getPostponedDisplayMessage

        public PostponedDisplayMessage getPostponedDisplayMessage​(java.time.LocalDateTime executionTime,
                                                                  EMessageCategory category,
                                                                  java.lang.String messageKey,
                                                                  java.lang.Object... messageArgs)
        Retrieve the postponed display message task. Add the task to the task list.
        Parameters:
        executionTime - when the message should pop up
        category - of the message
        messageKey - text key of the message
        messageArgs - array of message arguments
        Returns:
        postponed display message
      • getPostponedDisplayDialogMessage

        public PostponedDisplayDialogMessage getPostponedDisplayDialogMessage​(java.time.LocalDateTime executionTime,
                                                                              EMessageCategory category,
                                                                              DialogTemplate template)
        Retrieve the postponed display message task. The message is added to the task list.
        Parameters:
        executionTime - when the message should pop up
        category - of the message
        template - dialog template used for the dialog
        Returns:
        postponed display dialog message
      • getFinedTask

        public FinedTimedTask getFinedTask​(IHumanPlayer player,
                                           int fine,
                                           java.lang.String messageKey,
                                           java.time.LocalDateTime deadline)
        Create a timed task for a fine.
        Parameters:
        player - the fined player
        fine - positive fine amount
        messageKey - message key of the fine message
        deadline - time of the event
        Returns:
        timed event to be supplied to the timed task list.
      • getMarriageOfferTask

        public MarriageOfferTimedTask getMarriageOfferTask​(IHumanPlayer player,
                                                           MarriageBrokerAnnouncementState state,
                                                           java.time.LocalDateTime deadLine)
        Create a timed task for the marriage offer.
        Parameters:
        player - for whom the off is
        state - of the marriage announcemnt
        deadLine - of the task execution
        Returns:
        timed task to be suppled to the task list
      • getTravelToDelayed

        public TravelToTimedTask getTravelToDelayed​(javafx.geometry.Point2D destination,
                                                    INavigableVessel vessel,
                                                    java.util.Optional<ICity> city)
        Create a timed task for the delayed traveling event triggered and handled by the map view.
        Parameters:
        destination - coordinates on the screen
        vessel - that travels
        city - if the destination is a city
        Returns:
        timed task to be supplied to the timed task list.
      • getWarehouseTenantPayment

        public WarehouseTenantPayTimedTask getWarehouseTenantPayment​(IPlayer player,
                                                                     IWarehouseTenant tenant,
                                                                     java.time.LocalDateTime deadLine)
        Create a timed task for the payment of the warehouse tenant.
        Parameters:
        player - to which the payment is being made.
        tenant - who does the payment
        deadLine - when the payment happens
        Returns:
        timed task to be supplied to the task list.
      • getWarehouseTenantLeaving

        public WarehouseTentantLeaveTimedTask getWarehouseTenantLeaving​(ITradingOffice office,
                                                                        IWarehouseTenant tenant,
                                                                        java.time.LocalDateTime dealine)
        Create a timed task for the leaving of the warehouse tenant.
        Parameters:
        office - which is occupied by the tenant
        tenant - who is leaving
        dealine - date of the leaving
        Returns:
        timed task to be supplied to the task list.
      • getFreePirateTask

        public FreePirateTimedTask getFreePirateTask​(INonFreeSeaPirate seaPirate,
                                                     java.time.LocalDateTime deadline)
        Create a timed task to free a non free sea pirate.
        Parameters:
        seaPirate - to be freed.
        deadline - when it will happen
        Returns:
        timed task to be supplied to the task list.
      • getReputationUpdateTaskChurchFeeding

        public ChurchFeedingReputationUpdateTimedTask getReputationUpdateTaskChurchFeeding​(ICity city,
                                                                                           IPlayer player,
                                                                                           int amountBeggers,
                                                                                           java.time.LocalDateTime deadline)
        Create a timed task for the reputation update upon a church feeding.
        Parameters:
        city - where the feeding happend
        player - who sponsored the feeding
        amountBeggers - amount of feed beggars
        deadline - when it will happen
        Returns:
        timed task to be supplied to the task list.
      • getMarriageFeastDelivery

        public MarriageFeastDeliveryTask getMarriageFeastDelivery​(java.time.LocalDateTime deadline,
                                                                  IPlayer player,
                                                                  ICity city)
        Create a timed task for the marriage feast delivery check.
        Parameters:
        deadline - when the check should happen.
        player - who is responsible for delivering the wares
        city - where the wedding is happening.
        Returns:
        timed task to be supplied to the task list.