本文へ移動

Tsunagi繋ぎ

同じ印の2つを別々の線で結び、盤を埋めます。収録された問題やシード付きの問題で遊べます。

「つなぎ」は、物をつなぐことを表す言葉です。 名前について(英語)

目次

リファレンス · ルール・解法・生成

Step型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

WHERE A LINE MAY GO NEXT, on one board: the rules of a single step, which the solver, the check, the drawing and the answer's lines all read, so a bridge or a wall means the same thing everywhere.

  • Across an open edge (no wall) to the next cell.
  • Onto a BRIDGE only to go straight over it: into the cell beyond, the same way on, never turning. Going across uses the bridge's across slot, going down its down slot; the two are crossed by two different lines.
  • Into a PORTAL cell, and so out of the other one the same way on: the step is to the cell beyond the far portal, and the line takes both portal cells on the way (through, in the order it passes them). A portal cell itself has no steps and is never where a step ends; where the cell beyond the far portal is blocked, off the board or across a wall, that way into the portal is no step at all.

Imports carry their .ts so the level script can run this under plain node.

インポート

import type { Step } from "@johnmorrisdotca/tsunagi";

定義

type Step = {
    to: number;
    over: number;
    across: boolean;
    through: readonly number[];
};

メンバー

名前型説明
tonumber

The cell the line reaches.

overnumber

The bridge gone over on the way, or -1 for a plain step.

acrossboolean

Over a bridge: whether across (left or right) rather than down (up or down).

throughreadonly number[]

The portal cells gone through on the way, in order: the one stepped into, then its other. Empty for a step that goes through none.

例

import type { Step } from "@johnmorrisdotca/tsunagi";

const value: Step = {to:1,over:-1,across:true,through:[]};
console.log(value);
{ to: 1, over: -1, across: true, through: [] }

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/tsunagi 1.7.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。