TsunagiBoardLooktype
What a board is made of: every part a CSS colour.
Import it
import type { TsunagiBoardLook } from "@johnmorrisdotca/tsunagi/draw";
Definition
type TsunagiBoardLook = {
paper: string | readonly [
string,
string
];
frame: string;
grid: string;
ink: string;
coordinate: string;
};
Members
| Name | Type | Description |
|---|---|---|
paper | string | readonly [string, string] | The playing surface: one colour, or two, a light and a deep one, laid as a soft gradient. |
frame | string | The frame round the surface. |
grid | string | The rules between cells, and the dashed rim of a board that wraps. |
ink | string | Walls, blocked cells and a bridge's rails. |
coordinate | string | The letters and numbers down the sides, where they are drawn. |
Examples
import type { TsunagiBoardLook } from "@johnmorrisdotca/tsunagi/draw";
import { tsunagiBoardLook } from "@johnmorrisdotca/tsunagi/draw";
const value: TsunagiBoardLook = tsunagiBoardLook("paper");
console.log(value);{
paper: '#fbf8f1',
frame: '#a98954',
grid: '#cfc6b2',
ink: '#1f2320',
coordinate: '#7c5a30'
}What it prints (run when this page was built)