[freeciv-ai] Re: (PR#3619) coordinate fix in find_city_to_diplomat
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Per has the right understanding. The value does not need to be
an upper bound on any map distance. It may in fact make more
sense to limit it to 10 or 20 moves, i.e. a reasonable range
the diplomat can reach in reasonable time.
But Jason is right in that it mixes coordinate concepts. For
this it should at least have a comment that explains why it
doesn't matter in this case.
Per I. Mathisen wrote:
> On Wed, 5 Mar 2003, Jason Short wrote:
>>In find_city_to_diplomat, there is an initializer:
>>int best_dist = MAX(map.xsize, map.ysize);
>>this is no good under gen-topologies, because it is possible for a
>>distance to be larger than this (map.xsize and map.ysize are the
>>_native_ dimensions of the map, while the distance is in _map_ coordinates).
> It is also possible that the actual path to a distance is way longer than
> this. It is only a WAG (wild ass guess) number to limit things in a
> relatively sane way.
> There is no need to fix it for gen topol. Maybe for other reasons, though.
> - Per