Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Re: [RFC] Caching AI values
Home

[Freeciv-Dev] Re: [RFC] Caching AI values

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC] Caching AI values
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Fri, 5 Apr 2002 13:05:41 +0100 (BST)

On Thu, 4 Apr 2002, Raimar Falke wrote:

> On Thu, Apr 04, 2002 at 11:58:39AM +0100, Gregory Berkolaiko wrote:
> > On Wed, 3 Apr 2002, Raimar Falke wrote:
[..]
> > > > enemy targets reachable by unittype around a city (useful for
> > > > bombers etc)
> > > 
> > > for each unittype:
> > >  for area accessible with this unittype around city:
> > >   if tile has enemy unit:
> > > 
> > > should be fast.
> > 
> > and same here yet again
> > besides you don't just count enemy targets, you calculate the want, which 
> > uses win_chance
> 
> I don't understand this.

how do you count targets around the city?
you loop through the tiles and cal get_defender (to see if you have a 
reasonabl;e chance of killing them, otherwise it's not a target).

with airunit's range the loop is quite large.

G.




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