Made AStar abstract allowing for different methods.

AStar now has two children. One that uses a 2D array to find the path
between two points, while the other uses an adjacency matrix.