So, I've successfully implemented A* pathfinding (java) (http://www.cokeandcode.com/main/tutorials/path-finding/) in my game, but that pathfinding doesn't work as I wanted it to work. I don't know where should I look to change this behavior.
S - Start E - End
I want it to work like on the left side. Now it works like on the right side.
I am using a Manhattan heuristic.