Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: (PR#7350) Map radius change with city size
Home

[Freeciv-Dev] Re: (PR#7350) Map radius change with city size

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: remi.bonnet@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7350) Map radius change with city size
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Wed, 31 Mar 2004 21:21:03 -0800
Reply-to: rt@xxxxxxxxxxx

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

If all you want is the order of outwards iteration, then walking it as
in the corecleanups spiral macro is trivial O(1) process.

There is actually a value in doing outwards iteration in unit move
searches and such (like with pathfinding) vs array order iterations,
in that useful things are usually closer. But that is a very subtle
way to effect both performance and game behaviour.

Cheers,
Rossw
=====

Jason Short wrote:

> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7350 >
> 
> rwetmore@xxxxxxxxxxxx wrote:
> 
> 
>>Use brainpower to reorder the loops and document the process.
>>Leave this behind as a comment if you want to show off poor
>>programming skills that were avoided or whatever your rationale
>>for this code is.
> 
> 
> After applying my brainpower to the problem I've come to the conclusion 
> that city_map_iterate_outwards is not needed at all.  There is not a 
> single user I could find in which the iterate order made any significant 
> difference.
> 
> jason





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