lUpLeft method

bool lUpLeft(
  1. List<int> colors,
  2. [int? n]
)

Color with an L shape with direction up left from a starting position

Requires a list of colors. Return true on success.

Implementation

bool lUpLeft(List<int> colors, [int? n]) {
  if (!super.getCross.validatePosition(move.column, move.row - 2) ||
      !super.getCross.validatePosition(move.column - 2, move.row - 2)) {
    return false;
  }
  up(
    <int>[
      colors[0 % colors.length],
      colors[1 % colors.length],
      colors[2 % colors.length],
    ],
    3,
  );
  move.left();
  left(<int>[colors[3 % colors.length], colors[4 % colors.length]], 2);

  return true;
}