Class WestRepairStrategy

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

    public class WestRepairStrategy
    extends BaseRepairStrategy
    Repair strategy to only repair in towns in the western half of the map.
    • 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)
      Should repair only if deamage is heavy or if the ship is in a city in the west half of the map.
      • Methods inherited from class java.lang.Object

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

      • WestRepairStrategy

        public WestRepairStrategy()
    • Method Detail

      • shouldRepair

        public boolean shouldRepair​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
                                    ch.sahits.game.openpatrician.model.city.ICity city)
        Should repair only if deamage is heavy or if the ship is in a city in the west half of the map.
        Parameters:
        vessel - that should be checked for repair need.
        city - current possition of the vessel.
        Returns:
        true if the vessel should be repaired in the city.