drawTsunagiCodefunction
A level's layout code drawn, or an empty string for a code that is no layout at that size.
Import it
import { drawTsunagiCode } from "@johnmorrisdotca/tsunagi/draw";
Definition
function drawTsunagiCode(givens: string, size: number, options?: TsunagiDrawOptions): string
Parameters
| Name | Type | Description |
|---|---|---|
givens | string | The original native layout code. |
size | number | The number of cells on each side of the board. |
options (optional) | TsunagiDrawOptions | Native drawing, geometry, game or mount settings. |
Returns
string
A level's layout code drawn, or an empty string for a code that is no layout at that size.
Examples
import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
import { drawTsunagiCode } from "@johnmorrisdotca/tsunagi/draw";
const givens = TSUNAGI_4[0][0];
console.log(drawTsunagiCode(givens,4).startsWith("<svg"));trueWhat it prints (run when this page was built)