Reference · Rules, tiles and records
decodeGridfunction
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 it
import { decodeGrid } from "@johnmorrisdotca/kumimoji";
Definition
function decodeGrid(code: string): Map<string, string> | null
Parameters
| Name | Type | Description |
|---|---|---|
code | string | The encoded grid or progress text. |
Returns
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.
Examples
import { decodeGrid } from "@johnmorrisdotca/kumimoji";
console.log(decodeGrid("cat"));Map(3) { '0,0' => 'c', '0,1' => 'a', '0,2' => 't' }What it prints (run when this page was built)