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

[Freeciv-Dev] Re: Tech cost patch v8

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Tech cost patch v8
From: Juha Litola <slave@xxxxxxxxxxxx>
Date: Fri, 30 Nov 2001 22:30:34 +0200

On Fri, Nov 30, 2001 at 08:07:06PM +0100, Raimar Falke wrote:

> This isn't valid C:
This was c++:ism, I wonder how gcc compiled it.

> Replace
> +      int playerswithtech = 0;
> with
> +      int players_with_tech = 0;

> Replace
> +static int goal_tech_cost_rec(struct player *pplayer, Tech_Type_id goal)

> + Uses tech_goal to do calculation except with tech_cost_style == 0.
> What "tech_goal"?
Revision tiredness, didn't notice to update the comment. Should
be goal_tech_cost_rec. Fixed.

> Why is this special case need for tech_cost_style == 0 in goal_tech_cost?
Because costs for civ1 and civ2 style aren't consistent. Cost
of technology changes when we research new techs. Following from
that, goal_tech_cost just cannot be calculated in the same way
as other styles.

I made some cleanups to goal_tech_cost and rewrote tech_cost for
style 0 to give fastest path estimate for technology.

Attached is v11.

// Juha Litola

Attachment: tech_cost_style11.diff.gz
Description: Binary data

Attachment: pgpMXnWBfKS5V.pgp
Description: PGP signature

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