findPath

Finds a path at given coordinates in a grid using the A* algorithm.

@safe nothrow pure
Vector!int[]
findPath
(
inout bool[][] grid
,,)

Parameters

grid bool[][]

Grid.

begin Vector!int

The point is where you need to start looking for a way.

from Vector!int

The point where you need to find the path.

Return Value

Type: Vector!int[]

An array of points, i.e. consistent path to the end of the path. If the last point is not equal to the last point, then the path was not found and only the closest path to the point was found.

Meta