Making function more focused, and giving it a better name
Making function more focused, and giving it a better name

Function is now only responsible for finding the shortest
path, and not choosing the new target end point. This also
removes a side effect from the function (i.e. setting the
target end point variables).

jstrait/webgl-city,jstrait/webgl-city