geometor.arcprize.puzzles.grid
- class geometor.arcprize.puzzles.grid.Grid(grid, puzzle_id, set_type, index, io_type)[source]
Bases:
object
- property name
- property height
- property width
- property size
- property colors
- property color_counts
- property model
- rotate(k=1)[source]
Rotate the grid by 90 degrees k times. Positive k means clockwise rotation, negative k means counter-clockwise.
returns copy of Grid
- flip(axis=0)[source]
Flip the grid along the specified axis. axis=0 flips vertically, axis=1 flips horizontally.
returns copy of Grid
- set_range(row1: int, column1: int, row2: int, column2: int, color: int) str [source]
Set grid values for a range of pixels.