[Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Oct 23, 2001 at 03:10:53PM -0400, Jason Dorje Short wrote:
> Raimar Falke wrote:
> > If I see this example I vote for an action part in the
> > RAND_POS_CHECKED macro. It is silly to accumulate positions and than
> > do a for loop over them. So it should possible to pass a
> > "make_forest(x, y, hmap(x, y), 25)" to the RAND_POS_CHECKED
> > macro. This would also save us the malloc/free.
>
> Yes, it would. It would also allow other random position generation (like
> making huts) to use this macro.
>
> At this point, though, we see a descrepancy between the "random" method and
> the "structured" method of choosing positions, since the random method may
> happily choose the same position twice. If we have an action element to the
> loop as well, it will have to be done within both the random and structured
> algorithms; it will no longer be possible to discard all the randomly-chosen
> points if we move to a structured algorithm.
> So, it would make more sense IMO to separate these algorithms.
Ok as long as the interface it the same or similar.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
reality.sys corrupt. Reboot Universe? (y,n,q)
- [Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), (continued)
[Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), jdorje, 2001/10/23
- [Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), Raimar Falke, 2001/10/23
- [Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), Jason Dorje Short, 2001/10/23
- [Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), Raimar Falke, 2001/10/23
- [Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), Jason Dorje Short, 2001/10/23
- [Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017),
Raimar Falke <=
- [Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), Ross W. Wetmore, 2001/10/28
- [Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), Raimar Falke, 2001/10/28
[Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), Ross W. Wetmore, 2001/10/23
[Freeciv-Dev] Re: PATCH: rand_pos function and usage(PR#1017), Jason Dorje Short, 2001/10/24
[Freeciv-Dev] Re: PATCH: rand_pos function and usage(PR#1017), Ross W. Wetmore, 2001/10/28
[Freeciv-Dev] Re: PATCH: rand_pos function and usage (PR#1017), jdorje, 2001/10/26
|
|