This commit is contained in:
Kim Ravn Hansen
2025-09-04 16:54:03 +02:00
parent fc28f4ef55
commit 0acd46fb6b
16 changed files with 629 additions and 21 deletions

13
server/utils/dice.js Normal file
View File

@@ -0,0 +1,13 @@
export function withSides(sides) {
const r = Math.random()
return Math.floor(r * sides) + 1;
}
export function d6() {
return withSides(6);
}
export function d8() {
return withSides(8);
}