Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] (PR#4420) New traderoute rules
Home

[Freeciv-Dev] (PR#4420) New traderoute rules

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#4420) New traderoute rules
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Jul 2003 11:15:46 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[bursig - Sat Jun 28 22:50:20 2003]:

> Hi all
>  
>  This is next version of this code. It fix small bug and make some code
> clean. New function is added to common tree :
> get_caravan_enter_city_bonus(...) - which calculate caravan gold and
> science bonus and now is avilable to server and all clients. SDLClient
> try use it in new caravan dialog.

There are some style/naming issues.  New functions
(can_enter_marketplace) should have descriptive block comments, not the
dreaded '...' comment.  Operators (&& and ||) should go on the beginning
of a new line, not the end of the old line.

I think can_enter_marketplace is an unhelpful name.  Perhaps
can_cities_trade would be better (not to be confused with
can_establish_trade_route - what you call "entering the marketplace" is
basically "trade" as opposed to a "trade route")?

+  if (pcity_homecity->owner == pcity_dest->owner
+         && map_distance(pcity_homecity->x, pcity_homecity->y,
+                                 pcity_dest->x, pcity_dest->y) <= 8) {
+    return FALSE;
+  }

The above code should just call can_enter_marketplace, right?

I also have the problem that the patch doesn't compile; see unihand.c:1211.

jason



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