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 · SVG board

DrawOptionstype

What to draw with.

Import it

import type { DrawOptions } from "@johnmorrisdotca/suido/draw";

Definition

type DrawOptions = {
    masks?: readonly number[];
    quarters?: readonly number[];
    label?: string;
    style?: boolean;
    step?: number;
    water?: boolean;
};

Members

NameTypeDescription
masks (optional)readonly number[] | undefined

How every piece faces now; the board's own, if left out.

quarters (optional)readonly number[] | undefined

How far each piece has been turned in all, so a drawing can keep turning the way it was tapped; found from masks if left out.

label (optional)string | undefined

A description for screen readers.

style (optional)boolean | undefined

Put SUIDO_STYLE inside the drawing, so it stands alone as an image. A page with the style in already leaves this off.

step (optional)number | undefined

How long the water takes to go through one cell, in milliseconds. Default: fast enough that the whole board fills in about two seconds.

water (optional)boolean | undefined

Whether to draw the water. Default true.

Examples

import type { DrawOptions } from "@johnmorrisdotca/suido/draw";

const value: DrawOptions = {label:"Sample",water:true};
console.log(value);
{ label: 'Sample', water: true }

What it prints (run when this page was built)

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