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

[Freeciv-Dev] Re: Tech cost patch v8

[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 v8
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Nov 2001 19:07:10 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, Nov 30, 2001 at 06:30:10PM +0200, Juha Litola wrote:
> As there were now additional comment, changes to v7 are few:
> - integrated num_tech_reqs to precalc_tech_data
> 
> I guess this might be ready now.

Nice guess ;)

First I want to point out that I will take the freedom to apply some
style changes. Like changing

+    for(i=0; i<A_LAST; ++i)
to
+    for(i=0; i<A_LAST; i++)

Or
+  if(advances[itech].preset_cost!=-1)
+      secfile_insert_int(file, advances[itech].preset_cost, "%s.cost", prefix);
to
+  if(advances[itech].preset_cost!=-1) {
+      secfile_insert_int(file, advances[itech].preset_cost, "%s.cost", prefix);
   }

Or
+    cptr=put_uint8(cptr, packet->tech_cost_style);
to
+    cptr = put_uint8(cptr, packet->tech_cost_style);

Please tell me if you don't like.

Second:
+      mul = 10 * (players - playerswithtech) / players;
+      return mul * cost / 10;
should be rewritten as
       return ((players - playerswithtech)*cost)/players;

Third: the default cases. For the freeciv ruleset you set them to
tech_cost_style = 1 and tech_leakage = 1. We have to hear comments on
this. We may for example start with a civ3 ruleset where this is
activated.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  A supercomputer is a computer running an endless loop in just a second


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