DotsFiguretype
A figure laid out on a page of a given room.
Import it
import type { DotsFigure } from "@johnmorrisdotca/hoshi-stars/sheets";
Definition
interface DotsFigure {
constellation: Constellation;
level: DotLevel;
dots: Dot[];
lines: [
number,
number
][];
visits: number;
strokes: number;
}
Members
| Name | Type | Description |
|---|---|---|
constellation | Constellation | |
level | "easy" | "medium" | "hard" | |
dots | Dot[] | |
lines | [number, number][] | The lines of the answer, as pairs of indexes into |
visits | number | How many numbers there are to join: one for each visit. |
strokes | number | How many separate lines the pencil draws. |
Examples
import { dotsFigure, type DotsFigure } from "@johnmorrisdotca/hoshi-stars/sheets";
const crux: DotsFigure = dotsFigure("Cru", { level: "easy", widthMm: 180, heightMm: 150 });
console.log(crux.constellation.name, crux.visits, crux.lines.length);Crux 4 3What it prints (run when this page was built)