totalOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The kept faces added up, plus the bonus.
インポート
import { totalOf } from "@johnmorrisdotca/korokoro";
定義
function totalOf(faces: readonly number[], kept: readonly boolean[], modifier: number): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
faces | readonly number[] | Physical face values, in the order thrown. |
kept | readonly boolean[] | A mask saying which dice count towards the total. |
modifier | number | The bonus added after the dice totals. |
戻り値
number
The kept faces added up, plus the bonus.
例
import { totalOf } from "@johnmorrisdotca/korokoro";
console.log(totalOf([2, 5], [true, true], 3));10出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。