[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]
<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
|
|