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

[Freeciv-Dev] Small patch to AI Manage functions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Small patch to AI Manage functions
From: Zach Garner <zach@xxxxxxxxxxxxx>
Date: 07 Feb 2002 12:48:57 -0600

I'm slowly getting into the freeciv AI.

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

Zach Garner

Attachment: ai_manage_functions.patch
Description: Text document


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