Game - Map data structures

Innocence (a dot) innocenceklogdk
Sat Jun 19 17:55:19 CEST 2004

On 19 Jun 2004 02:43:06 GMT, sholden at (Sam
Holden) wrote:

>Which imples to me that the water object has an armies list or something
>hanging of it.

Of course there's an army-list containing all the army objects in the
game, but the plan was to make indexed links to this list from each
tile containing one or more armies. That way, if a player clicks a
tile the game knows which armies exists on that tile.

If I didn't have such links, I'd have to search through the entire
army list every time a tile is selected.

I know this makes for redundant data, but it's the only way I could
figure out how to avoid potiential performance issues when selecting
tiles. However, if there's a better way to do this I'd be happy to
know :)

Thanks :)

0:) Innocence

More information about the Python-list mailing list