Class WestRepairStrategy
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.strategy.BaseRepairStrategy
-
- ch.sahits.game.openpatrician.engine.player.strategy.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.
-
-
Constructor Summary
Constructors Constructor Description WestRepairStrategy()
-
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)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
repair
-
-
-
-
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.
-
-