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: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Small patch to AI Manage functions
From: Zach Garner <zach@xxxxxxxxxxxxx>
Date: 07 Feb 2002 14:13:06 -0600

> Mmm.  But still a unit can do nothing with no moves.  Why bother calling
> ai_manage_specific_type at all?

I guess its just my personal preference. To explain the way I think
about it:  For functions like ai_manage_caravan, there are conditions
which a unit needs to do something even though there are no moves left.
If at a later time, military units do require some kind of processing,
even though there are no moves left, I'd rather not have to modify the
calling functions just to get it to work correctly. This is an
encapsulation issue..

In ai_manage_caravan, the fist line of real code is:
  if (punit->activity != ACTIVITY_IDLE) return;
why not put this in ai_manage_unit as well as testing for moves_left?


Zach Garner





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