BIG_KINDS定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
THE BIG PIECES: squares of four cells that are one piece (Layout.bigs). There
are five, each given facing north as the four masks of its cells, clockwise from
the top left (blocks.ts). Each is a single pipe of the board's own size run
through four cells, or two side by side, so every opening of a big piece is the
opening of one of its cells, on the middle of that cell's edge: up to eight,
two on each side of the square.
end one opening: a pipe that goes in, round the square, and stops
hairpin two openings, side by side on one side: a pipe that goes in and comes straight back out
straight four openings, two on each of two opposite sides: two pipes side by side
elbow four openings, two on each of two sides that meet: two pipes side by side, one bending inside the other
tee six openings, two on each of three sides: one pipe straight through, the other branching out to the sideA big piece is turned in place a quarter at a time, and faces any of its four
turns (two for a straight): turning moves the piece in each cell round to the
next and turns it a quarter, as turnBlock does.
インポート
import { BIG_KINDS } from "@johnmorrisdotca/suido";
定義
const BIG_KINDS: { readonly end: readonly [3, 12, 9, 2]; readonly hairpin: readonly [5, 5, 9, 3]; readonly straight: readonly [5, 5, 5, 5]; readonly elbow: readonly [5, 3, 10, 3]; readonly tee: readonly [5, 7, 7, 5]; } = {
end: [3, 12, 9, 2],
hairpin: [5, 5, 9, 3],
straight: [5, 5, 5, 5],
elbow: [5, 3, 10, 3],
tee: [5, 7, 7, 5],
} as const
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
end | readonly [3, 12, 9, 2] | |
hairpin | readonly [5, 5, 9, 3] | |
straight | readonly [5, 5, 5, 5] | |
elbow | readonly [5, 3, 10, 3] | |
tee | readonly [5, 7, 7, 5] |
例
import { BIG_KINDS } from "@johnmorrisdotca/suido";
console.log(BIG_KINDS);{
end: [ 3, 12, 9, 2 ],
hairpin: [ 5, 5, 9, 3 ],
straight: [ 5, 5, 5, 5 ],
elbow: [ 5, 3, 10, 3 ],
tee: [ 5, 7, 7, 5 ]
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。