a_star

Function a_star 

Source
pub fn a_star(grid: &Grid, start: Point, goal: Point) -> Option<Vec<Point>>
Expand description

Finds the shortest path from a start to a goal point in a grid using the A* algorithm.

§Arguments

  • grid - The grid to search in.
  • start - The starting point of the path.
  • goal - The target point of the path.

§Returns

Some(Vec<Point>) containing the path from start to goal if one is found, otherwise None.