groupTiles関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The tiles split into the runs a gap is drawn between: by suit or by kind, each run in the set's order.
インポート
import { groupTiles } from "@johnmorrisdotca/jarajara";
定義
function groupTiles(codes: readonly string[], by?: TileGrouping): string[][]
引数
| 名前 | 型 | 説明 |
|---|---|---|
codes | readonly string[] | The tile face codes in current order. |
by (省略可) | TileGrouping | The native grouping mode. |
戻り値
string[][]
The tiles split into the runs a gap is drawn between: by suit or by kind, each run in the set's order.
例
import { groupTiles } from "@johnmorrisdotca/jarajara";
console.log(groupTiles(["a","b","F"],"suit"));[ [ 'a', 'b' ], [ 'F' ] ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。