isDark method

bool isDark(
  1. int row,
  2. int col
)

Please be aware of index out of bounds error yourself.

Implementation

bool isDark(int row, int col) {
  return _modules[row][col] == 1;
}