empserver/tests/fairland
Markus Armbruster b5d8806eb1 Fix tiny error in distribution of die rolls
"random() % n" is sound only when n is a power of two.  The error is
hardly relevant in Empire, because random() yields 31 bits, and our n
are always much smaller than 2^31.  Fix it anyway.

Use smallest the 2^m >= n instead of n, and discard numbers exceeding
n.

Bonus: faster for me even in the worst case n = 2^m+1.

Like the recent change to damage(), this changes some of the server's
die rolls, only this time the effect is pretty pervasive.  Worse,
fairland now creates a completely different random map for the same
seed.  Update expected smoke test results accordingly.
2013-05-08 06:55:20 +02:00
..
fairland.out Fix tiny error in distribution of die rolls 2013-05-08 06:55:20 +02:00
fairland.xdump Fix tiny error in distribution of die rolls 2013-05-08 06:55:20 +02:00
newcap_script Fix tiny error in distribution of die rolls 2013-05-08 06:55:20 +02:00