Pre-Calculating paths for the AStar path finding algorithm