Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] more small directional cleanups
Home

[Freeciv-Dev] Re: [PATCH] more small directional cleanups

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: Trent Piepho <xyzzy@xxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] more small directional cleanups
From: Jason Dorje Short <jshort@xxxxxxxxxxxxx>
Date: Wed, 22 Aug 2001 23:33:44 -0400

"Ross W. Wetmore" wrote:

> I'm not sure I'm concerned about the 1000 failure case. The universe is
> something like 10^30 nanoseconds old, and the probability you are worried
> about is 1 in 10^500 or so.

But doesn't it make you more satisfied knowing the algorithm is correct?

> But would you be willing to amalgamate the flavours to something like this?

Personally I prefer my unchecked "look for neighbors until you find one"
code to your "check once, then use the safe algorithm" method.

I think your zeal is misplaced.  Efficiency is not a concern with this
function.

> Note, that you don't need to drag the enum values into it, since you never
> care about specific compass directions and the DIR_DX array is always size
> 8.

Well, in theory you could change the system to go 1-8 pretty easily by
removing direct accesses to DIR_DX/DIR_DY (use a macro instead) and
changing the other directional system stuff in map.h.  This would break
uncountedly many things throughout the code, though, and really has no
point that I can see.

jason


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