mirrorCells method
It takes a list of cells and a direction, and then it moves to each cell and calls the appropriate mirror function
Args:
cells (List
Implementation
void mirrorCells(List<String> cells, String direction) {
switch (direction) {
case "horizontal":
{
for (final String s in cells) {
_commandCaller
..move(
"toPosition",
<int>[_rows[s[0]]!, _columns[s[1]]!],
)
..color("mirrorCellHorizontal", <dynamic>[]);
}
}
break;
case "vertical":
{
for (final String s in cells) {
_commandCaller
..move(
"toPosition",
<int>[_rows[s[0]]!, _columns[s[1]]!],
)
..color("mirrorCellVertical", <dynamic>[]);
}
}
break;
default:
{
_error = CatError.commandNotImplemented;
}
break;
}
}