readTileProgress関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The parts of a kept game, or null for a string that is not one: its shape only, with no bag to check it against.
インポート
import { readTileProgress } from "@johnmorrisdotca/kumimoji";
定義
function readTileProgress(code: string): { taken: number; returned: string; hand: string[]; tiles: Map<string, string>; } | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
code | string | The encoded grid or progress text. |
戻り値
{ taken: number; returned: string; hand: string[]; tiles: Map<string, string>; } | null
The parts of a kept game, or null for a string that is not one: its shape only, with no bag to check it against.
例
import { deal, encodeTileProgress, readTileProgress } from "@johnmorrisdotca/kumimoji";
const play = deal("catdog",3);
console.log(readTileProgress(encodeTileProgress(play)));{ taken: 3, returned: '', hand: [ 'c', 'a', 't' ], tiles: Map(0) {} }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。