本文へ移動

Tsunagi繋ぎ

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

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

目次

リファレンス · 遊べる盤

keptView関数

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

A view kept inside the board: never a gap between the board's edge and the box's. box is the box's width in pixels.

インポート

import { keptView } from "@johnmorrisdotca/tsunagi/play";

定義

function keptView(view: TsunagiView, box: number): TsunagiView

引数

名前型説明
viewTsunagiView

The current zoom and pixel translation.

boxnumber

The available square view size or edge bounds.

戻り値

TsunagiView

A view kept inside the board: never a gap between the board's edge and the box's. box is the box's width in pixels.

例

import { keptView } from "@johnmorrisdotca/tsunagi/play";

console.log(keptView({zoom:1,x:0,y:0},640));
{ zoom: 1, x: 0, y: 0 }

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

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

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