Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2000:
[Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player b
Home

[Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player b

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Thue Janus Kristensen <thue@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug)
From: Jules Bean <jmlb2@xxxxxxxxxxxxxxxx>
Date: Wed, 17 May 2000 10:57:35 +0100

On Wed, May 17, 2000 at 11:39:50AM +0200, Thue Janus Kristensen wrote:
> 
> Yes, some parts of the code it is smartest to use the player pointer. So
> use that there. It is just not smart when manipulating units, maps and
> bitvectors.

There's no need that player IDs be consecutive integers to have a
structure as effective as a bitvector.

Instead, determine a persistent player ID (not an array index) and
rework the bitvectors into bit-hashes.

OTOH, it's not clear to me why you need to re-order the players ever
--- if a player is removed, and that leaves a 'hole' in the player
array indexes, does that matter?

Jules

-- 
Jules Bean                          |        Any sufficiently advanced 
jules@{debian.org,jellybean.co.uk}  |  technology is indistinguishable
jmlb2@xxxxxxxxxxxxxxxx              |               from a perl script



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