Coloring class

It's a class that extends the BasicColoring class and adds a bunch of methods that color the cross in different ways

Inheritance

Constructors

Coloring(BasicShape shape)
Creating a new instance of the Coloring class, which is a subclass of the Coloring class.

Properties

getBoard List<List<int>>
It's a getter that returns the cross.
read-onlyinherited
getCross BasicShape
It's a getter that returns the cross object.
read-onlyinherited
hashCode int
The hash code for this object.
read-onlyinherited
move BasicMoves
Creating a new instance of the BasicMoves class, and passing in the validatePosition function as a parameter.
latefinalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

buildOffset(List<int> colors, int offset) List<int>
It takes a list of colors and an offset, and returns a new list of colors with the offset applied
inherited
color(int color) bool
Color the current position.
inherited
diagonalDownLeft(List<int> colors, [int? n]) bool
Color in diagonal with a direction down left from a current position defined by the movement.
inherited
diagonalDownRight(List<int> colors, [int? n]) bool
Color in diagonal with a direction down right from a current position defined by the movement.
inherited
diagonalUpLeft(List<int> colors, [int? n]) bool
Color in diagonal with a direction up left from a current position defined by the movement.
inherited
diagonalUpRight(List<int> colors, [int? n]) bool
Color in diagonal with a direction up right from a current position defined by the movement.
inherited
down(List<int> colors, [int? n]) bool
Color down from a current position defined by the movement.
inherited
fillEmpty(int color) bool
If the color of the cell is the default color, then change it to the color passed in.
inherited
joinBoards(BasicShape shape) bool
It copies the cross from the parameter to the global variable.
inherited
lDownLeft(List<int> colors, [int? n]) bool
Color with an L shape with direction down left from a starting position
lDownRight(List<int> colors, [int? n]) bool
Color with an L shape with direction down right from a starting position
left(List<int> colors, [int? n]) bool
Color left from a current position defined by the movement.
inherited
lLeftDown(List<int> colors, [int? n]) bool
Color with an L shape with direction left down from a starting position
lLeftUp(List<int> colors, [int? n]) bool
Color with an L shape with direction left up from a starting position
lRightDown(List<int> colors, [int? n]) bool
Color with an L shape with direction right down from a starting position
lRightUp(List<int> colors, [int? n]) bool
Color with an L shape with direction right up from a starting position
lUpLeft(List<int> colors, [int? n]) bool
Color with an L shape with direction up left from a starting position
lUpRight(List<int> colors, [int? n]) bool
Color with an L shape with direction up right from a starting position
mirrorCellHorizontal() bool
It mirrors a current cell horizontally
inherited
mirrorCellVertical() bool
It mirrors a current cell vertically
inherited
mirrorHorizontal() bool
If the row is less than or equal to 2, then mirror the piece horizontally up to down. Otherwise, mirror the piece horizontally down to up
mirrorHorizontalDownUp() bool
It takes the bottom half of the cross and mirrors it to the top half
inherited
mirrorHorizontalUpDown() bool
It takes the top half of the cross and mirrors it to the bottom half
inherited
mirrorVertical() bool
If the column is less than or equal to 2, then mirror the piece left to right, otherwise mirror the piece right to left
mirrorVerticalLeftRight() bool
It takes the first three columns of the cross and mirrors them to the last three columns
inherited
mirrorVerticalRightLeft() bool
It takes the last three columns of the cross and mirrors them to the first three columns
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Color right from a current position defined by the movement.
inherited
squareDownLeftUp(List<int> colors, [int? n]) bool
Color with a square shape from the current position.
squareDownRightUp(List<int> colors, [int? n]) bool
Color with a square shape from the current position.
squareLeftDownRight(List<int> colors, [int? n]) bool
Color with a square shape from the current position.
squareLeftUpRight(List<int> colors, [int? n]) bool
Color with a square shape from the current position.
squareRightDownLeft(List<int> colors, [int? n]) bool
Color with a square shape from the current position.
squareRightUpLeft(List<int> colors, [int? n]) bool
Color with a square shape from the current position.
squareUpLeftDown(List<int> colors, [int? n]) bool
Color with a square shape from the current position.
squareUpRightDown(List<int> colors, [int? n]) bool
Color with a square shape from the current position.
toString() String
A string representation of this object.
inherited
up(List<int> colors, [int? n]) bool
Color up from a current position defined by the movement.
inherited
zigzagDownLeftRight(List<int> colors, [int? n]) bool
Color with an zig-zag pattern with direction down left right from a starting position
zigzagDownRightLeft(List<int> colors, [int? n]) bool
Color with an zig-zag pattern with direction down right left from a starting position
zigzagLeftDownUp(List<int> colors, [int? n]) bool
Color with an zig-zag pattern with direction left down up from a starting position
zigzagLeftUpDown(List<int> colors, [int? n]) bool
Color with an zig-zag pattern with direction left up down from a starting position
zigzagRightDownUp(List<int> colors, [int? n]) bool
Color with an zig-zag pattern with direction right down up from a starting position
zigzagRightUpDown(List<int> colors, [int? n]) bool
Color with an zig-zag pattern with direction right up down from a starting position
zigzagUpLeftRight(List<int> colors, [int? n]) bool
Color with an zig-zag pattern with direction up left right from a starting position
zigzagUpRightLeft(List<int> colors, [int? n]) bool
Color with an zig-zag pattern with direction up right left from a starting position

Operators

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