PathFinding.js icon indicating copy to clipboard operation
PathFinding.js copied to clipboard

Show message 'no path' and exit if no path to reach the destination

Open mdtareque opened this issue 10 years ago • 1 comments

Hi, I find pathFinding.js example playground very useful. It's robust and informative.

A suggestion, it would be good if a message is display and execution is stopped if there is no way to reach the destination. Currently, I see grid is searched infinitely to find a path to a blocked destination cell. infinite

mdtareque avatar Oct 16 '15 18:10 mdtareque

Path finding algorithms are not able to know target is unreachable before entire map is searched. This has to be handled with other strategy, i.e., out of scope of PathFinding.js.

stakira avatar Oct 16 '15 19:10 stakira