Square class

Basic square for the CAT interpreter

Implemented types

Constructors

Square()
It creates a 6x6 matrix of zeros
Square.fromList(List<List<int>> grid)
Construct cross from an existing 6x6 matrix.

Properties

colors Map<int, Styles>
A map that maps the numbers to the colors.
read / write
getGrid List<List<int>>
It's a getter that returns the grid.
read-onlyoverride
grid List<List<int>>
It's a late final variable that is initialized in the constructor.
read / writeoverride
hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

copy() Square
It's a method that returns a copy of the current shape.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
validatePosition(int row, int column) bool
It's a method that checks if the position is valid.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited