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
    • Constructor Summary

      Constructors 
      Constructor Description
      PlayerEngine()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<AbstractEngine> getChildren()
      Any engine may hold various child engines.
      void handleDailyUpdate​(ch.sahits.game.event.data.ClockTickDayChange event)  
      void handleShipArrivalInCity​(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)  
      void handleShipReachesDestination​(ch.sahits.game.openpatrician.event.data.ShipArrivesAtDestinationEvent event)  
      void handleWeeklyUpdate​(ch.sahits.game.event.data.ClockTickDayChange event)
      Handling the daily update events.
      • Methods inherited from class java.lang.Object

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

      • PlayerEngine

        public PlayerEngine()
    • Method Detail

      • handleDailyUpdate

        public void handleDailyUpdate​(ch.sahits.game.event.data.ClockTickDayChange event)
      • handleWeeklyUpdate

        public void handleWeeklyUpdate​(ch.sahits.game.event.data.ClockTickDayChange event)
        Handling the daily update events.
        Parameters:
        event - day change update
      • 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.
      • handleShipReachesDestination

        public void handleShipReachesDestination​(ch.sahits.game.openpatrician.event.data.ShipArrivesAtDestinationEvent event)
      • handleShipArrivalInCity

        public void handleShipArrivalInCity​(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)