Reference · Rules, tiles and records
encodeGridfunction
A grid as a string, drawn from its own top-left tile: cat/2o/2w. decodeGrid reads it back.
Import it
import { encodeGrid } from "@johnmorrisdotca/kumimoji";
Definition
function encodeGrid(tiles: Tiles): string
Parameters
| Name | Type | Description |
|---|---|---|
tiles | Tiles | The map from row,column square names to internal tile codes. |
Returns
string
A grid as a string, drawn from its own top-left tile: cat/2o/2w. decodeGrid reads it back.
Examples
import { encodeGrid } from "@johnmorrisdotca/kumimoji";
const tiles = new Map([["0,0","c"],["0,1","a"],["0,2","t"]]);
console.log(encodeGrid(tiles));catWhat it prints (run when this page was built)