[freeciv-ai] Re: CM and celebration
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Jan 28, 2004 at 12:36:06AM +0100, Thomas Strub wrote:
> On Tue, Jan 27, 2004 at 04:54:37PM -0500, Benoit Hudson wrote:
> > When you put a high premium on celebration in the CMA (which for me is
> > always), cities of size 2 will often use one citizen as an entertainer
> > and thus have 1 happy and 1 entertainer, which is a majority of happy.
> > But cities of size 2 can't be in celebration (at least in the default
> > ruleset).
> > What's the correct way to deal with this issue? None of the functions
> > in city.c address that. "city_happy", which is what we call, just
> > checks for a majority of citizens being happy (regardless of number).
> > "city_celebrating" checks for size, but also requires that the city have
> > been happy the turn before, which we don't want.
> I said long time ago (first time Raimar explained CMA to us) that CM
> should be size dependent ...
I'm not sure what you mean, but here the problem is that there isn't a
function in a central place to determine whether a city will be
celebrating if you keep it happy. It would be bad style to spread this
logic out over the code any more than it currently is spread out -- and
certainly putting it in the CM code seems like a bad idea if we want to
have the CM do the right thing for non-default rulesets.