Reference · Rules, tiles and records
tableAreafunction
The squares to show: the tiles' extent and the margin, or the margin round square (0, 0) on an empty table. Extra squares (the one a typed letter goes to) are kept in.
Import it
import { tableArea } from "@johnmorrisdotca/kumimoji";
Definition
function tableArea(tiles: Tiles, also?: readonly string[]): Area
Parameters
| Name | Type | Description |
|---|---|---|
tiles | Tiles | The map from row,column square names to internal tile codes. |
also (optional) | readonly string[] | Additional square names to include in the table bounds. |
Returns
Area
The squares to show: the tiles' extent and the margin, or the margin round square (0, 0) on an empty table. Extra squares (the one a typed letter goes to) are kept in.
Examples
import { tableArea } from "@johnmorrisdotca/kumimoji";
const tiles = new Map([["0,0","c"],["0,1","a"],["0,2","t"]]);
console.log(tableArea(tiles));{ top: -2, left: -2, rows: 5, cols: 7 }What it prints (run when this page was built)