Class PlayerEngine


  • public class PlayerEngine
    extends AbstractEngine
    Base engine representing a player. If the player is AI the correseponding engine will be a subclass of this engine.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2015 Created on Jun 16, 2015
    • Field Detail

      • dailySailorCost

        @DependentValue("sailor.cost.per.day")
        private double dailySailorCost
      • map

        @Autowired
        private IMap map
      • clientServerEventBus

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

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

      • PlayerEngine

        public PlayerEngine()
    • Method Detail

      • init

        @PostConstruct
        private void init()
      • unregister

        @PreDestroy
        private void unregister()
      • handleWeeklyUpdate

        public void handleWeeklyUpdate​(ClockTickDayChange event)
        Handling the daily update events.
        Parameters:
        event - day change update
      • updateCompanyValue

        void updateCompanyValue()
      • 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.
      • dailyUpdateBalanceSheet

        private void dailyUpdateBalanceSheet()