Class CelebrationTask

  • All Implemented Interfaces:
    java.lang.Runnable
    Direct Known Subclasses:
    MarriageTask

    public class CelebrationTask
    extends TimedTask
    Timed task for a celebration
    Author:
    Andi Hotz, (c) Sahits GmbH, 2016 Created on Dec 08, 2016
    • Field Detail

      • date

        @Autowired
        private Date date
      • clientServerEventBus

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

        private final IPlayer player
      • city

        private final ICity city
    • Constructor Detail

      • CelebrationTask

        public CelebrationTask​(IPlayer player,
                               ICity city)
    • Method Detail

      • run

        public void run()
        Calculate the required amount of required wares for the celebration, deduce it from the stored wares, decide on the success of the celebration and update the Reputation.
      • calculateCelebrationState

        private CelebrationState calculateCelebrationState()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object