Completed 8-board solver with separate astar function