Line data Source code
1 : import { Distribution } from "../types.ts"; 2 1 : import { integer } from "./integer.ts"; 3 : 4 : /** 5 : * Returns a Distribution to return a value within [1, sideCount] 6 : * @param sideCount The number of sides of the die 7 : */ 8 0 : export function die(sideCount: number): Distribution<number> { 9 0 : return integer(1, sideCount); 10 0 : }