Class KontorTypeCityRepairStrategy

  • All Implemented Interfaces:
    ch.sahits.game.openpatrician.model.player.IAIShipRepairStrategy

    public class KontorTypeCityRepairStrategy
    extends BaseRepairStrategy
    Repair strategy defines only repairs in cities of kontor type Kontor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean shouldRepair​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel, ch.sahits.game.openpatrician.model.city.ICity city)
      Unless the damage is quite heavy repares are only conducted in cities of type Kontor.
      • Methods inherited from class java.lang.Object

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

      • KontorTypeCityRepairStrategy

        public KontorTypeCityRepairStrategy()
    • Method Detail

      • shouldRepair

        public boolean shouldRepair​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
                                    ch.sahits.game.openpatrician.model.city.ICity city)
        Unless the damage is quite heavy repares are only conducted in cities of type Kontor.
        Parameters:
        vessel - that should be checked for repair need.
        city - current possition of the vessel.
        Returns:
        true if the ship is to be constructed in the city.