refactoring in progress checkpoint reached

goal: remove class by breaking it up into smaller functions
This commit is contained in:
2023-09-23 15:29:41 +02:00
parent 2f4cde091b
commit 960a5a7d92
10 changed files with 220 additions and 33 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
export function getRandomInt(max: number) {
return Math.floor(Math.random() * max) + 1;
export function dAny(sides: number) {
return Math.floor(Math.random() * sides) + 1;
}
export function d6() {
return getRandomInt(6)
return dAny(6)
}