Inteligentna_smieciarka/heuristicfn.py

3 lines
100 B
Python

def heuristicfn(startx, starty, goalx, goaly):
return abs(startx - goalx) + abs(starty - goaly)