Quote:
Originally Posted by lch
It's almost the Manhattan metric. The game calculates the distance between (x0,y0) and (x1,y1) by
dx = |x0-x1|
dy = |y0-y1|
r = dx+dy
if (dx > 0 and dy > 0) --r
if (dx > 3 and dy > 3) --r
if (dx > 6 and dy > 6) --r
if (dx > 9 and dy > 9) --r
|
ok, I'll be the ignoramous.. I don't get the if (dx>0... etc
--r explain in english?