Class: AIPathGridSolver
The `AIPathGridSolver` class uses the A* algorithm to find the shortest path between a start
coordinate and an end coordinate on a grid.
Constructors
- new AIPathGridSolver(): AIPathGridSolver
Methods
- heuristic(grid: AIPathGrid, a: T, b: T)
The "heuristic" function returns an array of directions to move from point A to point B on a given
grid.
- grid: The `grid` parameter is an instance of the `AIPathGrid` class, which represents a grid
used for pathfinding. It contains information about the obstacles and walkable areas in the grid.
- a: The parameter "a" represents the starting position in the grid.
- b: The parameter "b" represents the destination position in the grid.
- solve(grid: AIPathGrid, startCoord: T, endCoord: T)
The "solve" function uses the A* algorithm to find the shortest path between a start coordinate and
an end coordinate on a grid.
- grid: A grid representing the pathfinding area. It contains information
about the obstacles and the values of each cell (empty = 0, obstacle = 1).
- startCoord: The `startCoord` parameter represents the starting coordinate of the path.
It is the coordinate from where the pathfinding algorithm will begin searching for a path.
- endCoord: The `endCoord` parameter represents the coordinates of the destination or end
point in the grid. It is the position that the algorithm is trying to reach from the `startCoord`
position.