Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: Small patch to AI Manage functions
Home

[Freeciv-Dev] Re: Small patch to AI Manage functions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Small patch to AI Manage functions
From: Zach Garner <zach@xxxxxxxxxxxxx>
Date: 09 Feb 2002 12:42:21 -0600

> Very good. If you are bored and want something to dig in, please check my TODO
> at http://pasky.ji.cz/~pasky/dev/freeciv/TODO - there's also described where
> the cleanups done by me can be found etc.

thanks for the pointer

> Unfortunatelly, I really lack the time for freeciv AI now ;(((. I will try to
> do my best to finish the ai_manage_explorer cleanup (Mike had some good
> objections) and try to move on to the next patch.
> 
> >   2.  I've changed from ai_manage_explorer(unit *) to
> > ai_manage_explorer(player *, unit *) to be consistent with other
> > ai_manage functions. Before the change, unit_owner(punit) had to be
> > computed every time ai_manage_explorer was called.
> 
> I feel relatively neutral with this. Something wrong with the current fashion?

It's really insignificant. From aiunit.c there is
   ai_manage_barbarian_leader(struct player, struct unit)   
   ai_manage_diplomat(struct player, struct unit)
   ai_manage_military(struct player, struct unit)
   ai_manage_caravan(struct player, struct unit)
   ai_manage_explorer(struct unit)

So all of the ai_manage_TYPE functions take two arguments except
ai_manage_explorer. All I am proposing is that this be made consistent.
Either require player as an argument, or call unit_owner(punit) within
all of the ai_manage_TYPE functions

> Can you please send the unified diff? This is very difficult to review for me.
> 

sorry... I've attached it this time


Thanks,
Zach

Attachment: ai_manage_functions.patch
Description: Text document


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