decodeGrid関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A grid read back, its first row at row 0, or null for anything that is not one: a stray character, a capital, a grid wider or taller than any grid of fifty tiles can be. An empty string is no tiles.
インポート
import { decodeGrid } from "@johnmorrisdotca/kumimoji";
定義
function decodeGrid(code: string): Map<string, string> | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
code | string | The encoded grid or progress text. |
戻り値
Map<string, string> | null
A grid read back, its first row at row 0, or null for anything that is not one: a stray character, a capital, a grid wider or taller than any grid of fifty tiles can be. An empty string is no tiles.
例
import { decodeGrid } from "@johnmorrisdotca/kumimoji";
console.log(decodeGrid("cat"));Map(3) { '0,0' => 'c', '0,1' => 'a', '0,2' => 't' }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。