Reference · Pipes, rules and solving
BIG_KINDSconstant
THE BIG PIECES: squares of four cells that are one piece (Layout.bigs). There
are five, each given facing north as the four masks of its cells, clockwise from
the top left (blocks.ts). Each is a single pipe of the board's own size run
through four cells, or two side by side, so every opening of a big piece is the
opening of one of its cells, on the middle of that cell's edge: up to eight,
two on each side of the square.
end one opening: a pipe that goes in, round the square, and stops
hairpin two openings, side by side on one side: a pipe that goes in and comes straight back out
straight four openings, two on each of two opposite sides: two pipes side by side
elbow four openings, two on each of two sides that meet: two pipes side by side, one bending inside the other
tee six openings, two on each of three sides: one pipe straight through, the other branching out to the sideA big piece is turned in place a quarter at a time, and faces any of its four
turns (two for a straight): turning moves the piece in each cell round to the
next and turns it a quarter, as turnBlock does.
Import it
import { BIG_KINDS } from "@johnmorrisdotca/suido";
Definition
const BIG_KINDS: { readonly end: readonly [3, 12, 9, 2]; readonly hairpin: readonly [5, 5, 9, 3]; readonly straight: readonly [5, 5, 5, 5]; readonly elbow: readonly [5, 3, 10, 3]; readonly tee: readonly [5, 7, 7, 5]; } = {
end: [3, 12, 9, 2],
hairpin: [5, 5, 9, 3],
straight: [5, 5, 5, 5],
elbow: [5, 3, 10, 3],
tee: [5, 7, 7, 5],
} as const
Members
| Name | Type | Description |
|---|---|---|
end | readonly [3, 12, 9, 2] | |
hairpin | readonly [5, 5, 9, 3] | |
straight | readonly [5, 5, 5, 5] | |
elbow | readonly [5, 3, 10, 3] | |
tee | readonly [5, 7, 7, 5] |
Examples
import { BIG_KINDS } from "@johnmorrisdotca/suido";
console.log(BIG_KINDS);{
end: [ 3, 12, 9, 2 ],
hairpin: [ 5, 5, 9, 3 ],
straight: [ 5, 5, 5, 5 ],
elbow: [ 5, 3, 10, 3 ],
tee: [ 5, 7, 7, 5 ]
}What it prints (run when this page was built)