setInventory関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The whole set as an inventory: each of the 42 faces and how many of it the 144 tiles hold.
インポート
import { setInventory } from "@johnmorrisdotca/jarajara";
定義
function setInventory(): { face: MahjongFace; copies: number; }[]
戻り値
{ face: MahjongFace; copies: number; }[]
The whole set as an inventory: each of the 42 faces and how many of it the 144 tiles hold.
例
import { setInventory } from "@johnmorrisdotca/jarajara";
console.log(setInventory().reduce((n,row)=>n+row.copies,0));144出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。