Reference https://www.kodeco.com/3016-introduction-to-a-pathfinding#toc-anchor-006 http://theory.stanford.edu/~amitp/GameProgramming/