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

MadeScoredtype

A new board with how hard it is.

Import it

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

Definition

type MadeScored = Made & {
    difficulty: number;
    tried: number;
};

Members

NameTypeDescription
codestring

The board as the player first sees it, every piece turned at random.

answerstring

The board solved: the same pieces facing as the answer has them.

layoutLayout
solutionnumber[]

The sides the answer's pieces open on.

seednumber
discardednumber

How many boards were laid and thrown away before this one had exactly one answer.

difficultynumber

1 to 100 among boards of its size: see difficultyOf.

triednumber

How many boards were made to find it, when a difficulty was asked for.

Examples

import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { decodeLayout } from "@johnmorrisdotca/suido";
import { levelAnswer, levelSolution } from "@johnmorrisdotca/suido/levels";
import type { MadeScored } from "@johnmorrisdotca/suido";

const row = SUIDO_5X5[0];
const code = row[0];
const layout = decodeLayout(code)!;
const answer = levelAnswer(row)!;
const solution = levelSolution(row)!;
const value: MadeScored = {...{code,answer,layout,solution,seed:42,discarded:0},difficulty:50,tried:1};
console.log(value);
{
  code: '5x5:j5a5C5I59Ib75f7a6CCa35aIC',
  answer: '5x5:maaaI5CacE7eafd53IB53aaIB',
  layout: {
    width: 5,
    height: 5,
    kind: 'network',
    wrap: false,
    cells: [
      3, 5, 10,  5, 2,  5,  8,  5,
      9, 8, 11,  7, 5, 15,  7, 10,
      6, 2,  2, 10, 3,  5, 10,  8,
      2
    ],
    sources: [ 0 ],
    drains: [
       4,  6,  9, 17,
      18, 23, 24
    ]
  },
  solution: [
     6, 10, 10, 10,  8,  5,  2, 10,
    12,  4,  7, 14, 10, 15, 13,  5,
     3,  8,  1,  5,  3, 10, 10,  8,
     1
  ],
  seed: 42,
  discarded: 0,
  difficulty: 50,
  tried: 1
}

What it prints (run when this page was built)

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