Files
cc3k/src/gold.cc

19 lines
393 B
C++

#include "gold.h"
int rand_gold_pile(RNG *rng) {
const int denominator = 8;
const int normal = 5;
const int dragon = 6;
int tmp = rng->rand_under(denominator);
if (tmp < normal)
return GOLD_NORMAL;
else if (tmp < dragon)
return GOLD_DRAGON;
else
return GOLD_SMALL;
return 0;
}