chore: moved Dice_Roll to location that matches with the header

This commit is contained in:
Sara 2025-09-18 15:32:55 +02:00
parent a379de4374
commit f379ed1b86

View file

@ -1,15 +1,6 @@
#include "dice.h"
#include <memory.h>
int Dice_Roll(enum Dice_Die die) {
if (die == COIN) {
return (rand() % 2);
} else {
int const max = die;
return (rand() % max) + 1;
}
}
static int activeDiceCount = 0;
static enum Dice_Die activeDice[MAX_ACTIVE_DICE];
@ -19,6 +10,15 @@ static struct Dice_ResultType rollTotal = {
.roll = 0, .string_len = 1,
};
int Dice_Roll(enum Dice_Die die) {
if (die == COIN) {
return (rand() % 2);
} else {
int const max = die;
return (rand() % max) + 1;
}
}
static
struct Dice_ResultType Dice_RollToResultType(int roll, enum Dice_Die die) {
struct Dice_ResultType result = { };