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: Zach Garner <zach@xxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Small patch to AI Manage functions
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Thu, 7 Feb 2002 19:22:16 +0000 (GMT)

 --- 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


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