Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] (PR#8773) rewrite city_map_iterate
Home

[Freeciv-Dev] (PR#8773) rewrite city_map_iterate

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8773) rewrite city_map_iterate
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 May 2004 01:53:15 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8773 >

> [rwetmore@xxxxxxxxxxxx - Thu May 27 10:13:23 2004]:
> 
> 
> Gregory Berkolaiko wrote:
> 
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=8773 >
> > 
> > On Sat, 22 May 2004, Jason Short wrote:
> [...]
> >>Using an array solution is fine with me, but someone has to code it. 
> >>And the method used in the corecleanups (a compile-time-generated
array) 
> >>is no good since these iterators may (in future) vary by topology, 
> >>CITY_MAP_RADIUS, or even per-city.  This is not easy to deal with in an 
> >>array solution. 
> 
> Actually it is rather trivial, and the ability to build or swap in a
> different array to get different behaviours is a very powerful tool
> for doing lots of things.

Perhaps I misunderstand you.

Are you saying we should use an array to hold the city positions for the
iterator?  This is obviously possible, since we do it already.  If
you're just suggesting that we turn city_map_iterate into a wrapper for
city_map_iterate_outwards, then you have a point (but I wonder why you
didn't just say it).

Or are you saying we should use an array to hold the validity
information currently determined by is_valid_map_pos?  This is IMO not
worthwhile, since with variable radiuses you'd need a different array
for each city.  (This is what I originally thought you were saying.  I
guess since the other alternative is already done, it didn't occur to me.)

jason



[Prev in Thread] Current Thread [Next in Thread]