[Freeciv-Dev] Re: stop ai from building useless buildings (2) (PR#1362)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, 5 Apr 2002, Petr Baudis wrote:
> I'll annoy you until you'll reply! ;)))
You're nasty ;-P
> Trailing whitespace. /me hides
How do you notice things like that?? Not fixing!
> > + /* The next idea is that if our enemies don't have any offensive
> > + airborne units, we don't have to worry. Go on the offensive! */
> > + if (unit_type(punit)->attack_strength > 1 && (is_air_unit(punit)
> > +
> > ||is_heli_unit(punit))) {
>
> This is so ugly.. :^)
There is no pleasing some people. If I wrote
if (unit_type(punit)->attack_strength > 1 && (is_air_unit(punit)
||is_heli_unit(punit))) {
then Greg would come after me. What would please you both?
if (unit_type(punit)->attack_strength > 1
&& (is_air_unit(punit)
||is_heli_unit(punit))) {
This?? No better, IMHO.
> > + /* these variables are used for improvements evaluations in
> > + ai/advdomestic.c, only valid between ai_eval_init and _done */
> > + bool eval_invasions; /* check if we need to consider invasions */
> > + bool *eval_continents; /* check non-allied cities on continents */
> > + bool eval_coastal; /* check if exists non-allied offensive ships */
> > + int eval_sdi; /* check for nukes: 0=no, 1=capability, 2=built */
> > + bool eval_sam; /* check for non-allied offensive aircraft */
>
> Why not separate structure?
I don't see the point, at least not yet. Need to think more about how to
do the AI data structures in general. I don't like AI stuff cluttering up
common/ players.h and cities.h and units.h.
For now I think the above is sufficient.
Yours,
Per
"While we're all in favor of Arafat doing more to suppress violence in
the Middle East, we fear that he doesn't have all that much influence on
the Israeli government. " --Sam Smith
|
|