Skip to the content

Suido水道

Turn pipes to connect the pumps and drains, through fixed levels or seeded puzzles.

Suido means water supply in Japanese. About the name

Contents

Reference · Pipes, rules and solving

BigShapetype

EVERY BIG PIECE THERE CAN BE. A big piece is four cells, each a small piece of its own, that are joined across the inside wherever both open towards each other and are not joined where neither does (isJoinedInside). So what four one-cell pieces can make side by side, a plate can: a cell with a cross in it, a corner next to a straight, two pipes that never meet, a tee beside an end. Each cell opens on at least one side, no four cells are all joined round the middle (the water would go round in a ring), and every pipe inside has an opening to the outside. That is 699 shapes up to turning, and BIG_SHAPES lists every one, the five BIG_KINDS among them.

A PIPE here is a run of joined cells, and the water in one does not reach another: two pipes side by side are two, however close. A plate has one, two or three, with one to eight openings in all, at most two on each side. A FAMILY is the plates with the same openings on their pipes, written largest first (3+2 is a pipe with three openings and one with two).

Import it

import type { BigShape } from "@johnmorrisdotca/suido";

Definition

type BigShape = {
    id: string;
    masks: readonly [
        number,
        number,
        number,
        number
    ];
    pipes: number;
    openings: number;
    family: string;
    named: BigKind | null;
};

Members

NameTypeDescription
idstring

The four masks, hex, of the shape's first facing in order of the masks: the same in every facing a plate is turned to.

masksreadonly [number, number, number, number]

The four cells' masks clockwise from the top left, in the facing that gives the least id.

pipesnumber

How many separate pipes the plate holds, 1 to 3.

openingsnumber

How many openings to the outside, 1 to 8.

familystring

The openings on each pipe, largest first and joined by +: 4, 2+2, 3+1+1.

named"end" | "hairpin" | "straight" | "elbow" | "tee" | null

The kind of BIG_KINDS it is, or null for one of the other shapes.

Examples

import type { BigShape } from "@johnmorrisdotca/suido";
import { BIG_SHAPES } from "@johnmorrisdotca/suido";

const value: BigShape = BIG_SHAPES[0];
console.log(value);
{
  id: '2c96',
  masks: [ 2, 12, 9, 6 ],
  pipes: 1,
  openings: 1,
  family: '1',
  named: null
}

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/suido 1.7.0.