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

turnfunction

A piece turned quarters quarter turns clockwise; a negative number turns it the other way.

Import it

import { turn } from "@johnmorrisdotca/suido";

Definition

function turn(mask: number, quarters?: number): number

Parameters

NameTypeDescription
masknumber

A pipe mask: north 1, east 2, south 4 and west 8.

quarters (optional)number

Clockwise quarter turns, per cell or for the piece specified by the signature.

Returns

number

A piece turned quarters quarter turns clockwise; a negative number turns it the other way.

Examples

import { turn } from "@johnmorrisdotca/suido";

console.log(turn(3,1));
6

What it prints (run when this page was built)

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