Class WestRepairStrategy
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.strategy.BaseRepairStrategy
-
- ch.sahits.game.openpatrician.engine.player.strategy.WestRepairStrategy
-
- All Implemented Interfaces:
IAIShipRepairStrategy
public class WestRepairStrategy extends BaseRepairStrategy
Repair strategy to only repair in towns in the western half of the map.
-
-
Constructor Summary
Constructors Constructor Description WestRepairStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
shouldRepair(INavigableVessel vessel, 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 ch.sahits.game.openpatrician.engine.player.strategy.BaseRepairStrategy
dissolveConvoy, repair
-
-
-
-
Field Detail
-
map
@Autowired private IMap map
-
-
Method Detail
-
shouldRepair
public boolean shouldRepair(INavigableVessel vessel, 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.
-
-