Implementation of A* pathfinding on a 25x25 grid with weighted nodes