Class OnlyTradingOfficeRepairStrategy
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.strategy.BaseRepairStrategy
-
- ch.sahits.game.openpatrician.engine.player.strategy.OnlyTradingOfficeRepairStrategy
-
- All Implemented Interfaces:
IAIShipRepairStrategy
public class OnlyTradingOfficeRepairStrategy extends BaseRepairStrategy
Repair strategy for only repairing in town where the player has a trading office.
-
-
Constructor Summary
Constructors Constructor Description OnlyTradingOfficeRepairStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
shouldRepair(INavigableVessel vessel, ICity city)
Unless the damage is heave only in towns where hte vessel owner has a trading office repairs should be conducted.-
Methods inherited from class ch.sahits.game.openpatrician.engine.player.strategy.BaseRepairStrategy
dissolveConvoy, repair
-
-
-
-
Method Detail
-
shouldRepair
public boolean shouldRepair(INavigableVessel vessel, ICity city)
Unless the damage is heave only in towns where hte vessel owner has a trading office repairs should be conducted.- Parameters:
vessel
- that should be checked for repair need.city
- current possition of the vessel.- Returns:
- true if the ship should be repaired in the city.
-
-