Piecetype
A piece from the queue: its cells relative to the top-left of its bounding box.
Import it
import type { Piece } from "@johnmorrisdotca/narabe";
Definition
type Piece = {
cells: readonly PieceCell[];
};
Members
| Name | Type | Description |
|---|---|---|
cells | readonly PieceCell[] |
Examples
import type { Piece } from "@johnmorrisdotca/narabe";
const value: Piece = {cells:[{row:0,col:0,stone:"black"},{row:0,col:1,stone:"white"}]};
console.log(value);{
cells: [
{ row: 0, col: 0, stone: 'black' },
{ row: 0, col: 1, stone: 'white' }
]
}What it prints (run when this page was built)