//#region src/core/pathfinding.d.ts /** * Grid A* — the pathfinding every top-down/RPG/tower-defense asks for and * agents keep re-inventing badly. Pure and dimension-free: cells in, cells * out; the caller maps cells to world units (px, meters, tiles). */ interface PathGrid { width: number; height: number; /** True = impassable. Out-of-bounds is always solid. */ solid(x: number, y: number): boolean; } interface FindPathOptions { /** Allow diagonal steps (blocked from cutting corners). Default true. */ diagonal?: boolean; /** Abort guard for huge/impossible searches. Default 20000 nodes. */ maxExpansions?: number; } /** * A* from `from` to `to` (inclusive cell coords). Returns the cell path * INCLUDING both endpoints, or null when unreachable. Straight steps cost * 1, diagonals √2; the heuristic is octile (admissible for both modes). */ declare function findPath(grid: PathGrid, from: [number, number], to: [number, number], opts?: FindPathOptions): [number, number][] | null; /** Build a PathGrid from row-strings ('#' = solid) — tests and tile games. */ declare function gridFromRows(rows: readonly string[]): PathGrid; //#endregion export { gridFromRows as i, PathGrid as n, findPath as r, FindPathOptions as t };