Re: [Freeciv-Dev] set_trade_prod.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, May 04, 1999 at 09:51:33PM +1000, David Pfitzner wrote:
> Tony Stuckey wrote:
> > set_trade_prod (the part that handles trade routes and corruption)
> > is called only from set_food_trade_shields (the part that handles
> > worker/tile aggregation). It appears to me to be a superfluous
> > distinction.
> > Should these functions be merged together? Is there a reason to
> > keep them apart?
>
> I haven't closely looked at that case (and anyway its already
> changed in cvs :-) but in general if a function does one specific
> thing in a self-contained manner, then I think its reasonable to
> keep it as a separate function, even if it is only called from one
> place. I tend to prefer lots of smallish functions, _provided_
> they are reasonably clearly thought out, and preferably well
> documented (the latter unfortunately not much the case in freeciv).
Okay.
I've been working on getting the AI to use trade routes, and just
noticed that it was kind of odd. At the very least, I was distracted by
the name. Apply_corruption_and_trade_routes would have made a lot more
sense.
Getting the AI to use diplomats to subvert opposing troops is my
next project, if Falk doesn't manage to sidetrack me into barbarian
uprisings. :)
--
Anthony J. Stuckey stuckey@xxxxxxxxxxxxxxxxx
"When I was young, the sky was filled with stars.
I watched them burn out one by one." -Warren Zevon
|
|