Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: Tech cost patch v7
Home

[Freeciv-Dev] Re: Tech cost patch v7

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Juha Litola <slave@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Tech cost patch v7
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Nov 2001 13:42:34 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, Nov 30, 2001 at 01:37:17PM +0200, Juha Litola wrote:
> On Fri, Nov 30, 2001 at 12:13:36PM +0100, Raimar Falke wrote:
> 
> > num_req_techs() can be removed. The code should go into
> Okay, I'll zap it.
> 
> > precalc_tech_data. IMHO
> > +  if(counted[tech])
> > +    return 0;
> > should be
> > +  if(counted[tech])
> > +    return advances[tech].num_reqs
> 
> No, it would go wrong then. Imagine tech tree like below.
> 
>         tech a
>     |            |
>   tech b      tech c
>        |      |
>         tech d
> 
> Where tech a is requirement for tech b and so on.
> Currently num_tech_reqs return 4 for tech d. If I'd implement your
> change, it would give 5, as tech a will be counted twice. That will
> leak to highly inconsistent costs in techs that have common requirements.

Ahh I see.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  The trick is to keep breathing.


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