package biz.pavonis.hexameter.api;

import java.util.Set;

/**
 * Supports common operations on a {@link HexagonalGrid}.
 * Operations supported:
 * <ul>
 * <li>Calculating distance between 2 {@link Hexagon}s.</li>
 * <li>Calsulating movement range from a {@link Hexagon} using an arbitrary distance.</li>
 * </ul>
 * <em>Not implemented yet, but are on the roadmap:</em>
 * <ul>
 * <li>Calculating movement range with obstacles</li>
 * <li>Calculating field of view</li>
 * <li>Pathfinding between two {@link Hexagon}s (using obstacles)</li>
 * </ul>
 */
public interface HexagonalGridCalculator {

	/**
	 * Calculates the distance (in hexagons) between two {@link Hexagon} objects on the grid.
	 * 
	 * @param hex0
	 * @param hex1
	 * @return distance
	 */
	int calculateDistanceBetween(Hexagon hex0, Hexagon hex1);

	/**
	 * Returns all {@link Hexagon}s which are within distance (inclusive) from the {@link Hexagon}.
	 * 
	 * @param hexagon {@link Hexagon}
	 * @param distance
	 * @return {@link Hexagon}s within distance (inclusive)
	 */
	Set<Hexagon> calculateMovementRangeFrom(Hexagon hexagon, int distance);
}

@@ -1109,10 +1109,427 @@
 tance);%0A
+%09%0A%09/**%0A%09 * Returns the shortest path between start and end %7B@link Hexagon%7D.%0A%09 * %0A%09 * @param start%0A%09 *            the path starts here.%0A%09 * @param end%0A%09 *            the path ends here.%0A%09 * @param algorithm%0A%09 *            the algorithm to find the shortest path with.%0A%09 * @return all %7B@link Hexagon%7Ds on the shortest path.%0A%09 */%0A%09List%3CHexagon%3E calculatePath(Hexagon start, Hexagon end, PathfindingAlgorithm algorithm);%0A
 %7D%0A

Update HexagonalGridCalculator.java