Update PathFinder.js

path finding to shortest distance implemented if shortest paths fails it continues all others as they appear as the only movable paths.