Class EightyPercentRepairStrategy
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.strategy.BaseRepairStrategy
-
- ch.sahits.game.openpatrician.engine.player.strategy.EightyPercentRepairStrategy
-
- All Implemented Interfaces:
IAIShipRepairStrategy
public class EightyPercentRepairStrategy extends BaseRepairStrategy
Repair strategy for going to repair when ship health drops below 80%.
-
-
Constructor Summary
Constructors Constructor Description EightyPercentRepairStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
shouldRepair(INavigableVessel vessel, ICity city)
Decide if thevessel
should be repaired, when it is incity
.-
Methods inherited from class ch.sahits.game.openpatrician.engine.player.strategy.BaseRepairStrategy
dissolveConvoy, repair
-
-
-
-
Method Detail
-
shouldRepair
public boolean shouldRepair(INavigableVessel vessel, ICity city)
Description copied from interface:IAIShipRepairStrategy
Decide if thevessel
should be repaired, when it is incity
.- Parameters:
vessel
- that should be checked for repair need.city
- current possition of the vessel.- Returns:
- true if the ship should be repaired.
-
-