| Wow, Pascal. Haven't used that since the mid 1980's.
I don't remember much syntax, but here's a distance algorthm you can implement easily (and should look familiar):
distance = sqrt( (x1 - x2)^2 * (y1 - y2)^2 )
where x1,y1 is one position and x2,y2 is another on your grid. |