Reference · Rolls and exact odds
waysToShutfunction
Every way to make a total from different numbers 1 to 9, largest first: the tiles a Shut the Box roll may shut.
Import it
import { waysToShut } from "@johnmorrisdotca/korokoro";
Definition
function waysToShut(total: number): number[][]
Parameters
| Name | Type | Description |
|---|---|---|
total | number | The total to measure or compare. |
Returns
number[][]
Every way to make a total from different numbers 1 to 9, largest first: the tiles a Shut the Box roll may shut.
Examples
import { waysToShut } from "@johnmorrisdotca/korokoro";
console.log(waysToShut(7));[ [ 7 ], [ 6, 1 ], [ 5, 2 ], [ 4, 3 ], [ 4, 2, 1 ] ]What it prints (run when this page was built)