[Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> wrote:
> --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: >
> On Sun, Dec 02, 2001 at 07:24:08PM +0000, Gregory Berkolaiko wrote:
> > > Function like assess_danger(city) will search through _all_ enemy
> > units
> > > and calculate whether they endanger the city. For this it needs an
> > array
> > > with distances to the city by both land and sea. This is why both
> > costs
> > > are needed sometimes.
> > >
> >
> > > You cannot record them in one array since the distance from A to B
> > can be
> > > different depending on whether you swim or walk.
> >
> > But the enemy unit can either swim or walk. So you make the decision
> > while you generate the warmap.
>
> I am sorry if I did not make myself clear.
> The function works as follows:
> 1. It finds the distances from the city to surrounding tiles by land and
> by sea.
> 2. It looks for the enemy units within certain distance and estimates how
> much they endanger the city.
>
The above is a nice comment. I would like to see it in the code.
__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), (continued)
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Petr Baudis, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/05
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), vze2zq63, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Petr Baudis, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Ross W. Wetmore, 2001/12/05
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068),
Raahul Kumar <=
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Ross W. Wetmore, 2001/12/05
|
|