Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210)
Home

[Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>, Mike Kaufman <mkaufman@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Mon, 11 Feb 2002 12:36:49 +0000 (GMT)

 --- Petr Baudis <pasky@xxxxxxxxxxx> wrote: 
> First, I feel very sorry for the long delay. But late is better than
> not at all
> ;).
> 
> Dear diary, on Thu, Jan 24, 2002 at 04:25:52AM CET, I got a letter,
> where Mike Kaufman <mkaufman@xxxxxxxxxxxxxx> told me, that...
> > 
> >   /*
> >    * PART 1: Look for huts
> >    * Non-Barbarian Ground units ONLY.
> >    */
> >   
> >   if (!is_barbarian(pplayer)
> >       && is_ground_unit(punit)) {
> >     /* Maximal acceptable _number_ of moves to the target */
> >     int maxmoves = pplayer->ai.control ? 2 * THRESHOLD : 3;
> >     /* Move _cost_ to the best target (=> lower is better) */
> >     int bestcost = maxmoves * SINGLE_MOVE + 1;
> >     /* Desired destination */
> >     int best_x = -1, best_y = -1;
> > 
> >     /* CPU-expensive but worth it -- Syela */
> >     generate_warmap(map_get_city(x, y), punit);
> > 
> > >> Syela puts this outside the if...
> 
> Why I didn't? ;-) Fixed, sir.

Aaabjection!

Imagine a boat which has plenty of black tiles next to it.
It won't do Part 1 and it will use all it's points in Part 2, so it will
never use the warmap.  So why should a CPU-expensive operation performed
on it?

I acknowledge that this is slightly more than a mere cleanup but I think
it should be changed, maybe in a separate patch.

Apart from this I have no complaints resp. the patch and I did read it
quite carefully.

I think that it should be committed immediately to free both developer's
and maintainer's time so that they can address real problems, such as MY
patches ;)

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]