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