GuidePiece型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One piece of the guide.
インポート
import type { GuidePiece } from "@johnmorrisdotca/suido";
定義
type GuidePiece = {
id: string;
group: PieceGroup;
name: string;
text: string;
layout: Layout;
water: boolean;
facings: number | null;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string | Its name in the address of a page or the name of a picture: lower case words joined with hyphens. |
group | PieceGroup | |
name | string | Its name, in English. |
text | string | What it is and what it does, in a sentence or two, in English. |
layout | Layout | A board with the piece on it. Drawn as it is, so a pump the water leaves from shows its water. |
water | boolean | Whether the picture shows the water. |
facings | number | null | How many ways it faces when it is turned: 1, 2 or 4; null for a thing that is not turned. |
例
import type { GuidePiece } from "@johnmorrisdotca/suido";
import { SUIDO_PIECE_GUIDE } from "@johnmorrisdotca/suido";
const value: GuidePiece = SUIDO_PIECE_GUIDE[0];
console.log(value);{
id: 'ground',
group: 'turn',
name: 'Ground',
text: 'Bare ground, with nothing on it. Only boards whose water need not reach every piece have it, and it is never turned.',
layout: {
width: 1,
height: 1,
kind: 'network',
wrap: false,
cells: [ 0 ],
sources: [],
drains: []
},
water: false,
facings: null
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。