Class HometownRepairStrategy
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.strategy.BaseRepairStrategy
-
- ch.sahits.game.openpatrician.engine.player.strategy.HometownRepairStrategy
-
- All Implemented Interfaces:
ch.sahits.game.openpatrician.model.player.IAIShipRepairStrategy
public class HometownRepairStrategy extends BaseRepairStrategy
Repair strategy to repair the ship in the hometown.
-
-
Constructor Summary
Constructors Constructor Description HometownRepairStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanshouldRepair(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel, ch.sahits.game.openpatrician.model.city.ICity city)Only repair the ship in the hometown unless it is realy badly damaged.-
Methods inherited from class ch.sahits.game.openpatrician.engine.player.strategy.BaseRepairStrategy
repair
-
-
-
-
Method Detail
-
shouldRepair
public boolean shouldRepair(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel, ch.sahits.game.openpatrician.model.city.ICity city)Only repair the ship in the hometown unless it is realy badly damaged.- 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.
-
-