Class 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 Detail

      • OnlyTradingOfficeRepairStrategy

        public OnlyTradingOfficeRepairStrategy()
    • 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.