Hi everyone

This program is using A* search and it supposed to find the shortest path for Pacman in the program as(px,py) or currentCell to catch the ghost in the program as(gx,gy)or goalCell.for computing the heuristic value it should use Manhattan distance method
and the formula f (n) = alpha * g(n)+beta * h(n)
1-my problem is that I cant get pacman to move more than 3 cells and after that it start's from the begining...