sub getXY { my($xp, $yp) = @_; ($xp, $yp) = (int(($xp+1)/20), int(($yp+1)/20)); return ($xp, $yp); } # getXY