I suggest A* Pathfinding.
It’s a really neat algorithm that should do what you want.
2
solved Shortest path on a grid with obstacles [closed]
 
I suggest A* Pathfinding.
It’s a really neat algorithm that should do what you want.
2
solved Shortest path on a grid with obstacles [closed]