960a5a7d92
goal: remove class by breaking it up into smaller functions
9 lines
136 B
TypeScript
9 lines
136 B
TypeScript
|
|
export function dAny(sides: number) {
|
|
return Math.floor(Math.random() * sides) + 1;
|
|
}
|
|
|
|
export function d6() {
|
|
return dAny(6)
|
|
}
|