groupStarts関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The places in a list, already in order, where a new group starts: every place whose tile is of another suit (or kind) than the one before it.
インポート
import { groupStarts } from "@johnmorrisdotca/jarajara";
定義
function groupStarts(codes: readonly string[], by?: TileGrouping): number[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
codes | readonly string[] | The tile face codes in current order. |
by (省略可) | TileGrouping | The native grouping mode. |
戻り値
number[]
The places in a list, already in order, where a new group starts: every place whose tile is of another suit (or kind) than the one before it.
例
import { groupStarts } from "@johnmorrisdotca/jarajara";
console.log(groupStarts(["a","b","F"],"suit"));[ 2 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。