Interface IPathfinder<TCoordinates>
- Namespace
- AlphaFramework.World.Paths
- Assembly
- AlphaFramework.World.dll
A strategy pattern interface for pathfinding algorithms.
public interface IPathfinder<TCoordinates> where TCoordinates : struct
Type Parameters
TCoordinatesData type for storing position coordinates of objects in the game world.
- Extension Methods
Methods
FindPath(TCoordinates, TCoordinates)
Calculates a path from source to target coordinates.
IEnumerable<TCoordinates>? FindPath(TCoordinates start, TCoordinates target)
Parameters
startTCoordinatesThe starting coordinates.
targetTCoordinatesThe end coordinates.
Returns
- IEnumerable<TCoordinates>
A list of coordinates forming a path;
nullif no path was found.