lengthRows関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
For one opening hand, each length of game: how many tiles it deals, from one set and from two, and how many are wild at each level.
インポート
import { lengthRows } from "@johnmorrisdotca/kumimoji";
定義
function lengthRows(hand?: number): LengthRow[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
hand (省略可) | number | The hand size or tile codes, as declared by the function signature. |
戻り値
LengthRow[]
For one opening hand, each length of game: how many tiles it deals, from one set and from two, and how many are wild at each level.
例
import { lengthRows } from "@johnmorrisdotca/kumimoji";
console.log(lengthRows(7));[
{
length: 'short',
tiles: 40,
doubleTiles: 80,
wilds: { easy: 6, medium: 3, hard: 0 }
},
{
length: 'medium',
tiles: 72,
doubleTiles: 144,
wilds: { easy: 11, medium: 5, hard: 0 }
},
{
length: 'full',
tiles: 144,
doubleTiles: 288,
wilds: { easy: 22, medium: 11, hard: 0 }
}
]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。