Turns damage() into a one-liner. damage() now uses random() % 32768 in chance() instead of random() % 100 inline, therefore can round differently for the same pseudo-random number. Update expected smoke test results accordingly. Aside: "random() % n" distributes evenly only when n is a power of two. 100 isn't. However, because random() yields at least 31 bits, and 100 is so much smaller than 2^31, the error is vanishingly small. |
||
---|---|---|
.. | ||
fairland | ||
files | ||
smoke | ||
fairland-test | ||
files-test | ||
normalize.pl | ||
smoke-test | ||
test-common.sh |