Reference · Rules, tiles and records
gridToTextfunction
A grid as lines of text, the way it lies on the table: English letters in
capitals with a space between squares and a dot for an empty one, kana side
by side with a full-width dot for an empty one, so that either lines up in a
fixed-width face, every row as wide as the crossword. A wild that has been given nothing is *. No tiles is "".
Import it
import { gridToText } from "@johnmorrisdotca/kumimoji";
Definition
function gridToText(tiles: Tiles, language?: KumimojiLanguage): string
Parameters
| Name | Type | Description |
|---|---|---|
tiles | Tiles | The map from row,column square names to internal tile codes. |
language (optional) | KumimojiLanguage | The English or Japanese tile language. |
Returns
string
A grid as lines of text, the way it lies on the table: English letters in capitals with a space between squares and a dot for an empty one, kana side by side with a full-width dot for an empty one, so that either lines up in a fixed-width face, every row as wide as the crossword. A wild that has been given nothing is *. No tiles is "".
Examples
import { gridToText } from "@johnmorrisdotca/kumimoji";
const tiles = new Map([["0,0","c"],["0,1","a"],["0,2","t"]]);
console.log(gridToText(tiles));C A TWhat it prints (run when this page was built)