keptFaces関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Which faces count towards the total when one is kept. Ties keep the first die that shows the kept value.
インポート
import { keptFaces } from "@johnmorrisdotca/korokoro";
定義
function keptFaces(faces: readonly number[], keep: Keep): boolean[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
faces | readonly number[] | Physical face values, in the order thrown. |
keep | Keep | Whether all dice, the highest or the lowest count. |
戻り値
boolean[]
Which faces count towards the total when one is kept. Ties keep the first die that shows the kept value.
例
import { keptFaces } from "@johnmorrisdotca/korokoro";
console.log(keptFaces([1, 4, 6], "highest"));[ false, false, true ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。