Class NextCourierPatrolStation


  • public class NextCourierPatrolStation
    extends ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
    Author:
    Andi Hotz, (c) Sahits GmbH, 2014 Created on Feb 16, 2014
    • Field Summary

      • Fields inherited from class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener

        clientServerEventBus
    • Constructor Summary

      Constructors 
      Constructor Description
      NextCourierPatrolStation​(ch.sahits.game.openpatrician.model.ship.IShip ship, ch.sahits.game.openpatrician.model.city.ICity city, CourierPatrolStateInternal state, ch.sahits.game.openpatrician.model.IPlayer player, java.time.LocalDateTime deadline)
      Create the next patrol station listener.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean execute​(ch.sahits.game.openpatrician.model.city.ICity city)  
      void handleShipEntersPort​(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)  
      • Methods inherited from class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener

        getCity, getShip, ignoreEventCity
      • Methods inherited from class java.lang.Object

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

      • NextCourierPatrolStation

        public NextCourierPatrolStation​(ch.sahits.game.openpatrician.model.ship.IShip ship,
                                        ch.sahits.game.openpatrician.model.city.ICity city,
                                        CourierPatrolStateInternal state,
                                        ch.sahits.game.openpatrician.model.IPlayer player,
                                        java.time.LocalDateTime deadline)
        Create the next patrol station listener. This listener adds itself to the event queue and removes the first city from the patrol state
        Parameters:
        ship - for which to construct the next patrol station
        city - of the next patrol station
        state - internal patrol state
        player - patroling player
        deadline - until when the patrol has to reach the city.
    • Method Detail

      • handleShipEntersPort

        public void handleShipEntersPort​(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)
        Overrides:
        handleShipEntersPort in class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
      • execute

        public boolean execute​(ch.sahits.game.openpatrician.model.city.ICity city)
        Specified by:
        execute in class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener