[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]
<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
- [Freeciv-Dev] Re: (PR#9741) Problem inside setup_isledata() (not really important),
Jason Short <=
|
|