work in progress, can be branched/merged

This commit is contained in:
2024-07-13 16:13:20 -04:00
parent ccf6dd0582
commit 5f3565fa86
8 changed files with 289 additions and 0 deletions

18
src/gold.cc Normal file
View File

@ -0,0 +1,18 @@
#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;
}