isValidPosition function

bool isValidPosition(
  1. int col,
  2. int row,
  3. int numCols,
  4. int numRows,
)

Implementation

bool isValidPosition(int col, int row, int numCols, int numRows) =>
    col >= 0 && col < numCols && row >= 0 && row < numRows;