wrote a* algorithm for 2d [][]int graph