finished the bulk of game

This commit is contained in:
2024-07-14 21:32:41 -04:00
parent b3475b7530
commit af8bc4112c
110 changed files with 1876 additions and 1481 deletions

View File

@ -1,5 +1,7 @@
#include "gold.h"
#include "constants.h"
int rand_gold_pile(RNG *rng) {
const int denominator = 8;
const int normal = 5;
@ -16,3 +18,23 @@ int rand_gold_pile(RNG *rng) {
return 0;
}
gold get_gold_at(const position &pos, gold_list &glist) {
gold ret = {0, {0, 0}};
for (size_t i = 0; i < glist.size(); ++i)
if (glist[i].pos == pos) {
ret = glist[i];
glist.erase(i + glist.begin());
return ret;
}
return ret;
}
int rand_gold_drop(RNG *rng) {
if (rng->coin_flip())
return GOLD_NORMAL;
return GOLD_SMALL;
}