[Freeciv-Dev] Re: Small patch to AI Manage functions
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Zach Garner <zach@xxxxxxxxxxxxx> wrote:
> I'm slowly getting into the freeciv AI.
take it easy ;)
> I've enclosed a small patch based off cvs snapshot from Feb. 7 that
> makes the manage unit functions a little more consistent. It makes two
> changes:
> 1. Individual unit management functions (ai_manage_military, etc)
> determine if they have any moves left instead of making ai_manage_unit
> check that. I feel that ai_manage_unit should simply determine the
> correct unit management function for the particular unit, and let that
> function take care of details.
Mmm. But still a unit can do nothing with no moves. Why bother calling
ai_manage_specific_type at all?
> 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.
unit_owner is just an accessor function and should be optimised away.
but for consistency sake...
in any case there is a pending patch for ai_manage_explorer so you should
probably contact Petr who made the patch.
Best,
G.
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
[Freeciv-Dev] Re: Small patch to AI Manage functions, Petr Baudis, 2002/02/09
|
|