diff -r 51305152af09 -r 716595242a19 src/ai/api/ai_marine.hpp --- a/src/ai/api/ai_marine.hpp Tue Jun 17 21:44:41 2008 +0000 +++ b/src/ai/api/ai_marine.hpp Tue Jun 17 22:37:09 2008 +0000 @@ -67,6 +67,19 @@ static bool IsCanalTile(TileIndex tile); /** + * Checks whether the given tiles are directly connected, i.e. whether + * a ship vehicle can travel from the center of the first tile to the + * center of the second tile. + * @param tile_from The source tile. + * @param tile_to The destination tile. + * @pre AIMap::IsValidTile(tile_from). + * @pre AIMap::IsValidTile(tile_to). + * @pre 'tile_from' and 'tile_to' are directly neighbouring tiles. + * @return True if and only if a ship can go from tile_from to tile_to. + */ + static bool AreWaterTilesConnected(TileIndex tile_from, TileIndex tile_to); + + /** * Builds a water depot on tile. * @param tile The tile where the water depot will be build. * @param vertical If true, depot will be vertical, else horizontal.