本文へ移動

Tsunagi繋ぎ

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

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

目次

リファレンス · SVGの盤

TsunagiBoardLook型

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

What a board is made of: every part a CSS colour.

インポート

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

定義

type TsunagiBoardLook = {
    paper: string | readonly [
        string,
        string
    ];
    frame: string;
    grid: string;
    ink: string;
    coordinate: string;
};

メンバー

名前型説明
paperstring | readonly [string, string]

The playing surface: one colour, or two, a light and a deep one, laid as a soft gradient.

framestring

The frame round the surface.

gridstring

The rules between cells, and the dashed rim of a board that wraps.

inkstring

Walls, blocked cells and a bridge's rails.

coordinatestring

The letters and numbers down the sides, where they are drawn.

例

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

const value: TsunagiBoardLook = tsunagiBoardLook("paper");
console.log(value);
{
  paper: '#fbf8f1',
  frame: '#a98954',
  grid: '#cfc6b2',
  ink: '#1f2320',
  coordinate: '#7c5a30'
}

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

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

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