Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#9741) Problem inside setup_isledata() (not really
Home

[Freeciv-Dev] Re: (PR#9741) Problem inside setup_isledata() (not really

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mstefek@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#9741) Problem inside setup_isledata() (not really important)
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Aug 2004 01:15:07 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9741 >

Mateusz Stefek wrote:

> Example: Suppose we have three players and two islands. The first one  
> with goodies = 2000 and the second with goodies = 1000. The first one  
> will get 3 starting positions and the second only one.

 From get_tax_income():

   /*
    * Distribution of the trade among science, tax and luxury via a
    * modified Hare/Niemeyer algorithm (also known as "Hamilton's
    * Method"):
    *
    * 1) distributes the whole-numbered part of the three targets
    * 2) sort the remaining fractions (called *_rest)
    * 3) divide the remaining trade among the targets starting with the
    * biggest fraction. If two targets have the same fraction the
    * target with the smaller whole-numbered value is chosen.
    */

this should be generalized, moved into utility/, and used for both cases.

jason




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