Skip to content

Function: readPreset() ​

ts
function readPreset(
   preset, 
   thrown, 
   before?, 
   language?
): PresetReading;

Defined in: src/games/presets.ts:148

Read a roll the way a game does. before is the rolls made just before it in the same game, oldest first, for a game that reads a roll in their light: the point in craps, a turn's total in Pig. language is "en" or "ja". The roll may be of other dice than the preset opens with (a pool made larger, a bonus added): it is read all the same.

Parameters ​

preset ​

Preset

thrown ​

Roll

before? ​

readonly Roll[] = []

language? ​

"en" | "ja"

Returns ​

PresetReading

MIT © John Morris