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
TCoordinates
Data 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
start
TCoordinatesThe starting coordinates.
target
TCoordinatesThe end coordinates.
Returns
- IEnumerable<TCoordinates>
A list of coordinates forming a path;
null
if no path was found.