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

drawGuidePiecefunction

A piece of the guide (SUIDO_PIECE_GUIDE) as SVG text: its tiny board drawn by drawSuido, with the water in it where the guide says the picture has some, and the piece's name as its description for a screen reader. style puts the board's style inside the drawing, so it stands alone as an image.

Import it

import { drawGuidePiece } from "@johnmorrisdotca/suido/draw";

Definition

function drawGuidePiece(piece: GuidePiece, options?: { style?: boolean; label?: string; }): string

Parameters

NameTypeDescription
pieceGuidePiece

A guide piece with its example layout and caption.

options (optional){ style?: boolean; label?: string; }

Drawing, mounting or generator choices specified by the signature.

Returns

string

A piece of the guide (SUIDO_PIECE_GUIDE) as SVG text: its tiny board drawn by drawSuido, with the water in it where the guide says the picture has some, and the piece's name as its description for a screen reader. style puts the board's style inside the drawing, so it stands alone as an image.

Examples

import { drawGuidePiece } from "@johnmorrisdotca/suido/draw";
import { SUIDO_PIECE_GUIDE } from "@johnmorrisdotca/suido";

console.log(drawGuidePiece(SUIDO_PIECE_GUIDE[0]).startsWith("<svg"));
true

What it prints (run when this page was built)

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