本文へ移動

Tsunagi繋ぎ

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

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

目次

リファレンス · SVGの盤

TsunagiPiece型

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

ONE GROUP OF A DRAWING: what tsunagiDrawing hands a page instead of one long string, so that a page keeping its drawing in a framework's own tree writes only the groups whose text changed. A piece is a <g> with these attributes, holding either its SVG text or more pieces (a pair's washes, its line and its little marbles are a piece each, so a finger moving through a cell changes one or two pairs and not the thousands of elements of a 30×30 board).

インポート

import type { TsunagiPiece } from "@johnmorrisdotca/tsunagi/draw";

定義

type TsunagiPiece = {
    key: string;
    attributes: Readonly<Record<string, string>>;
    html?: string;
    pieces?: readonly TsunagiPiece[];
};

メンバー

名前型説明
keystring

Stable from one drawing of a board to the next.

attributesReadonly<Record<string, string>>
html (省略可)string | undefined

Its SVG text, unless it holds pieces.

pieces (省略可)readonly TsunagiPiece[] | undefined

例

import type { TsunagiPiece } from "@johnmorrisdotca/tsunagi/draw";

const value: TsunagiPiece = {key:"ground",attributes:{class:"tsu-ground"},html:""};
console.log(value);
{ key: 'ground', attributes: { class: 'tsu-ground' }, html: '' }

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

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

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