UNPKG

@randsum/roller

Version:

A flexible, type-safe dice roller for tabletop RPGs, game development, and probability simulations

8 lines (5 loc) 221 B
import { coreRandom } from './coreRandom' export function coreSpreadRolls(quantity: number, max: number): number[] { if (quantity <= 0) return [] return Array.from({ length: quantity }, () => coreRandom(max) + 1) }