A* pathfinding algorithm help
Hey everyone, i've recently started learning programming. I tried creating a maze solver program based on A* algorithm, but it does not seem to function correctly. For example, at the top left corner, directly moving right would be faster, however the program first goes down and goes up again before moving to the right path.

Solver.cs4.32KB