Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149)
Home

[Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Thu, 20 Dec 2001 14:56:35 +0000 (GMT)

 --- Petr Baudis <pasky@xxxxxxxxxxx> wrote: 
> 
> Attached revised patch. I changed building_value to impr_happy_val - it
> maybe
> looks more unfriendly at the first sight, but I believe it's more
> descriptive
> and less confusing.

Read carefully.
Found one serious mistakes and few English language picks.
See below.


> +Get value of best usable title on city map.

Usable tile.

>  }
> +  /* If units are making us unhappy, count that too. */
> +  sad += pcity->ppl_unhappy[3] - pcity->ppl_unhappy[2];
> +  /* Angry citizens has to be counted double!? */

they _have_ to be counted double

> -    j += 16 * (sad + bored); /* Desperately seeking Colosseum */
> -  while (i) { i--; j += 16; } /* 16 is debatable value */
> -  /* using (i && bored) led to a lack of foresight,
> -     especially re: Chapel -- Syela */
> -  freelog(LOG_DEBUG, "%s: %d elvis %d sad %d bored %d size %d max %d
> val",
> +    value += SADVAL * (sad + content);
> +  
> +  /* Usage of (happy && bored) led to a lack of foresight, especially
> +   * re: Chapel -- Syela */
> +  while (happy) { happy--; happy += SADVAL; }
                             ^^^^^^^^
surely you mean value here ;)

actually i liked the name "bored".  with an appropriate comment it's
quite good and funny

> +Pollution benefit or cost of given improvement.
> +
> +Positive return value: less pollution if this improvement would be
> built
> +Negative return value: more pollution if this improvement would be
> built
> +Higher distance from zero means higher effect, naturally.

Maybe "Bigger absolute value means greater effect" ?


The below is very anti-generalised improvements, right?

> +  /* Count production bonuses generated by various buildings. */
> +  if (city_got_building(pcity, B_FACTORY) || impr_type == B_FACTORY) {
> +    prodbonus += 50;
> +    if (city_got_building(pcity, B_MFG) || impr_type == B_MFG) {
> +      prodbonus *= 2;
>      }

etc.

In general the patch is very good and I can only pity it's sad fate.

Best,
G.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


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