Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
Re: [Freeciv-Dev] PATCH: AI governments + PATCH hell level
Home

Re: [Freeciv-Dev] PATCH: AI governments + PATCH hell level

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Rizos Sakellariou <rizos@xxxxxxxxxxx>
Cc: Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: Re: [Freeciv-Dev] PATCH: AI governments + PATCH hell level
From: Nicolas Brunel <brunel@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 7 Jul 1999 22:36:10 +0000 (GMT)

> On Wed, Jul 07, 1999 at 06:10:40PM +0000, Nicolas Brunel wrote:
> > +    if (strcmp(pplayer->name,"old000")>0 &&
> > strcmp(pplayer->name,"old999")<0)
> > +       ai_eval_buildings_old(pcity);
> > +    else
> > +       ai_eval_buildings(pcity);
> > 
> > Now, one knows what name to use to have pre-rizo AIs vs rizo AIs.
> 
> Wouldn't it be natural to use the ai levels for this purpose?

Yes !

Attached is a patch with Rizo patch in it updated to latest cvs +
a new level hell (I like 4 letters commands). Hell is gamelevel 9.
I add new command CMD_HELL for the server. Use 'hell' level exactly as you
use 'easy','normal' and 'hard' level before.

Here some comments and some changes I have done to Rizo patch :

--- In aihand.c

put player.h respecting alphabetic order.

I don't like the fc_malloc in ai_hand.
Why don't you C mechanism 
...
{ struct city tmpcity; 
...
}

When you write *tmpcity=*pcity, what does It do with
 int ppl_happy[5], ppl_content[5], ppl_unhappy[5];

Does it really copy the array or only int * ?

Use pplayer->ai.skill_level instead of player name.

--- In advdomestic.c

Remplace 2 if (0) freelog by freelog

Put int railroad_trade(struct city *pcity) ROAD->RAILROAD 

--- In advdomestic.h 

Declare the function ai_eval_buildings_old(pcity); to have no implicit
declarations.

--- In aicity.c

Use pplayer->ai.skill_level instead of player name.

Ps
I did a grep skill_level in the ai directory and ... found nothing !

Attachment: democracy.diff.gz
Description: democracy.diff.gz


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