Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12927) RFC: rename pplayer->player_no
Home

[Freeciv-Dev] (PR#12927) RFC: rename pplayer->player_no

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12927) RFC: rename pplayer->player_no
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 28 Apr 2005 13:21:15 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12927 >

I would like to rename pplayer->player_no as pplayer->index.  This makes
it consistent with other values that are indexes into arrays:

  ptile->index
  pnation->index
  pgov->index
  pimpr->index
  putype->index

etc., etc.

Note the difference from pcity->id and punit->id.  These are keys into a
hash so I think "id" is appropriate rather than "index".  Not so for the
player_no.

The only difference between player_no and other pxxx->index is that the
player_no can occasionally be changed.  Players get renumbered from time
to time in pregame.  However the invariant that the player_no is always
the index into the players array will always be true.

Aside from the insane hugeness such a patch might take, does anyone
object to this?  One possible argument you could make is that they
should all be called "id".

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12927) RFC: rename pplayer->player_no, Jason Short <=