public void setLine(int startRowIndex, int startColumnIndex, int rowDiff, int columnDiff) {
        while (true) {
            startRowIndex += rowDiff;
            startColumnIndex += columnDiff;
            if (startRowIndex < 1 || startColumnIndex < 1 || startRowIndex > dimension || startColumnIndex > dimension) {
                break;
            }
            setForbidden(startRowIndex, startColumnIndex);
            rowCounts[startRowIndex]--;
        }
    }