in reply to To Voronoi (and if so how)?
For example, you could set the value of $plane[$x][$y] to 'S' for if it's shortlist-only, 'L' for longlist-only, and 'SL' if it's both.
In the simple case of 'SL', you know the closest one.
Otherwise, you would do a walk-about. Start by checking the four to the N, S, E, & W. Then, check the NE, NW, SE, & SW. And, then keep doing that, keeping in mind the very simple distance algorithm and how it's affected by number-over and number-up. You're doing sort of a radiating-out-from-the-center algorithm.
------
/me wants to be the brightest bulb in the chandelier!
Vote paco for President!
|
|---|