Class WestRepairStrategy

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private IMap map  
    • Field Detail

      • map

        @Autowired
        private IMap map
    • Constructor Detail

      • WestRepairStrategy

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