Naive implementation of the a* shortest route finding algorithm.