Complete.Org: Mailing Lists: Archives: freeciv-ai: December 2004:
[freeciv-ai] Re: (PR#9610) AI movemap

[freeciv-ai] Re: (PR#9610) AI movemap

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#9610) AI movemap
From: "Benedict Adamson" <badamson@xxxxxxxxxxx>
Date: Tue, 21 Dec 2004 13:28:27 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: >

Per I. Mathisen wrote:
> I am not too hot on your fix, though. Using genlists directly is bad. I
> think perhaps using a specvec here might be better. We know how big to
> make it beforehand

I don't think we do know how large to make the vector before recording 
things in it. Each vector records the IDs of all the units that that can 
reach a particular tile in one (or two) turns. How can we know that 
before computing the movemap? If specvec provided a push_back function, 
as the std::vector template of C++  does, we could use a specvec.

Or am I missing something?

Note that the genlist are never used directly outside the movemap code 
itself; the provided movemap_iterate_one_turn and 
movemap_iterate_two_turn macros hide it.

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