Maze Solving Algorithm Shortest Path Java