A React app to visualize the A* path-finding algorithm
There are 3 main (.tsx) files in the project
- Grid
- Node
- A*
Holds the logic behind displaying and animating the algorithm and all of the event handlers used by the Node component.
also style file :
Grid.css
Simple dumb component responsible only for displaying a single node and calling the proper event handler .
style file contains the animation keyframes :
node.css
Contains the algorithm logic , mainly a function aStar()
const aStar: (
grid: INode[][],
start: INode,
end: INode
) => INode[] | undefined
contains an interface to represent a single node and a function to compare nodes.