[Freeciv-Dev] Re: [PATCH] more small directional cleanups
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, 22 Aug 2001, Ross W. Wetmore wrote:
>
> But his code is about 2-3 times more expensive for the standard case and
How so? I think the generation of the random number is the most expensive
part, and I only do that once for the common case.
> I think that the problem of calling rand_neighbour() to generate a random
> adjacent tile when there are no adjacent tiles is a programming error that
It's not so much calling it when there're are no possibilities, but that you
depend on randomly finding one of the valid neighbors. You could guess a
random number 1000 times and still not find it. It seems bad to me
to depend on "luck" to keep your code from locking up.
[Freeciv-Dev] Re: [PATCH] more small directional cleanups, Ross W. Wetmore, 2001/08/20
[Freeciv-Dev] Re: [PATCH] more small directional cleanups,
Trent Piepho <=
Message not available[Freeciv-Dev] Re: [PATCH] more small directional cleanups, Ross W. Wetmore, 2001/08/22
[Freeciv-Dev] Re: [PATCH] more small directional cleanups, Jason Dorje Short, 2001/08/22
[Freeciv-Dev] Re: [PATCH] more small directional cleanups, Trent Piepho, 2001/08/22
|
|