Class NextCourierPatrolStation
- java.lang.Object
-
- ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
-
- ch.sahits.game.openpatrician.display.event.handler.impl.NextCourierPatrolStation
-
public class NextCourierPatrolStation extends ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener- Author:
- Andi Hotz, (c) Sahits GmbH, 2014 Created on Feb 16, 2014
-
-
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 booleanexecute(ch.sahits.game.openpatrician.model.city.ICity city)voidhandleShipEntersPort(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)
-
-
-
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 stationcity- of the next patrol stationstate- internal patrol stateplayer- patroling playerdeadline- until when the patrol has to reach the city.
-
-
Method Detail
-
handleShipEntersPort
public void handleShipEntersPort(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)
- Overrides:
handleShipEntersPortin classch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
-
execute
public boolean execute(ch.sahits.game.openpatrician.model.city.ICity city)
- Specified by:
executein classch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
-
-