Complete.Org: Mailing Lists: Archives: freeciv-dev: June 1999:
Re: [Freeciv-Dev] struct government + AI
Home

Re: [Freeciv-Dev] struct government + AI

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] struct government + AI
From: Sune Kirkeby <sune@xxxxxxxxxxxxx>
Date: Wed, 9 Jun 1999 09:17:24 +0200

On Tue, Jun 08, 1999 at 07:24:58PM -0400, Greg Wooledge wrote:
> Peter Schaefer (schaefer@xxxxxx) wrote:
> 
> > BTW, is it possible to assign an empire size to a government ?
> > Empire size as in a modificator to the city factor .. .
> 
> There already is such a factor, but it's implicit:
> 
> 
> int content_citizens(struct player *pplayer) 
> {
>   int cities =  city_list_size(&pplayer->cities);
>   int content = game.unhappysize;
>   int basis   = game.cityfactor - (G_DEMOCRACY - pplayer->government);
> 
>   if (cities > basis) 
>     content--;
>   return content;
> }
> 
> 
> I pointed out the problems with this code a while back; there may still
> be other places where government values are hard-coded.  I haven't
> looked at Sune's patches in great detail, so he(?) may have fixed this
> along with other things.
> 
> If it doesn't, then I'd love to see this (G_DEMOCRACY - X) value moved
> into a "government struct", and preferably into a ruleset file.
> 

I have been working on replacing the G_ values with elements in
struct government, or with globals (government_when_anarchy for
example).  The above is one of the places I still have not fixed,
simply because I was not sure what that calculation does (beyond
the obvious).  Not knowing what exactly it does, I could not very
well name the element :-)

Any ideas?

Sune Kirkeby

P.S. Is there are place where documentation for the elements of
struct game are described?


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