AStar class

Class responsible for calculating the best route using the A* algorithm.

Constructors

AStar({required int rows, required int columns, required Point<int> start, required Point<int> end, required List<Point<int>> barriers, bool withDiagonal = true})

Properties

barriers List<Point<int>>
final
columns int
final
end Point<int>
final
grid List<List<Tile>>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
rows int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start Point<int>
final
withDiagonal bool
final

Methods

findThePath({ValueChanged<List<Point<int>>>? doneList}) Iterable<Point<int>>
Method that starts the search
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

resumePath(Iterable<Point<int>> path) List<Point<int>>
Resume path Example: (1,2),(1,3),(1,4),(1,5) = (1,2),(1,5)