getColumn method

List<Cell> getColumn(
  1. int colNum
)

Returns a list of Cell at row # colNum

Implementation

List<Cell> getColumn(int colNum) {
  throwIfInvalid(new Position(row: 0, column: colNum));
  List<Cell> _tmpCol = [];

  for (int c = 0; c < 9; c++) {
    _tmpCol.add(_matrix![c][colNum]);
  }
  return _tmpCol;
}