struct

Piebox::Cell

Inherits Struct < Value < Object

Represents a cell in a 2-column, 3-row grid. col and row are 0-indexed. Spans default to 1.

Constructors

new(col : Int32, row : Int32, col_span : Int32 = 1, row_span : Int32 = 1)
Source

Instance methods

col_span
Source
covered_positions

Returns set of {col, row} pairs this cell covers.

Source
landscape?

Whether the cell is wider than it is tall (in grid units).

Source
row_span
Source
units

Number of grid units this cell occupies.

Source