Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)
Home

[Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Fri, 30 Nov 2001 22:53:24 -0500

On examination it looks like it has fixed the earlier technical flaws.

There is still an objection to straightest_direction() hardcoding the
topology into the code, as opposed to using a data lookup algorithm
with the data stored with the rest of the topology (there is no guarantee
that a y displacement is NORTH-SOUTH or even SOUTH-NORTH).

I hate it when people do this, but it is a suggestion. real_map_vector()
is both more compact, and more descriptive than base_real_map_distance().
Search and replace on the patch would fix this with minimum fuss :-).

I haven't been able to test it yet. But if it produces equalivalent
autogames, that should be reasonable proof.

If it tests out, it should go in.

Cheers,
RossW
=====

At 11:55 AM 01/11/27 +0100, Raimar Falke wrote:
>On Sun, Nov 11, 2001 at 06:19:17PM +0100, Raimar Falke wrote:
>> On Thu, Nov 01, 2001 at 06:26:48AM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx
wrote:
>> > This patch introduces a new topology function,
>> > base_real_map_distance().  It performs a similar function to
>> > real_map_distance, but also finds a distance vector from the source to
>> > the destination coordinate pair.  It also replaces xdist and ydist.
>> > 
>> > A function like this is absolutely essential for iso-rectangular
>> > topologies.  xdist() and ydist() will not work because you cannot find
>> > the distance along one coordinate axis independently of the other.
>> 
>> I changed it a bit. Now real_map_distance, sq_map_distance and
>> map_distance follow all the same scheme.
>> 
>> Comments?
>
>And another one. Changes since last version:
> - change the range of dx in map_distance_vector and document the
> ranges
> - add CHECK_MAP_POS to map_distance_vector
> - change the implementation of is_tiles_adjacent
>
>Please review and comment.
>
>       Raimar
>
>-- 
> email: rf13@xxxxxxxxxxxxxxxxx
> "Your mail could not be delivered to the following Address:
>  VTCMC.VTLPR@xxxxxxxxxxxxx        ** Unassigned error message **"
>
>Attachment Converted: "c:\program
files\eudora\attach\map_distance_vector21.dif"
>



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