private boolean compressRow(int[] row) {

        int[] tempRow = new int[SIDE];
        int j = 0;

        for (int i = 0; i < SIDE; i++) {
            if (row[i] != 0) {
                tempRow[j] = row[i];
                j++;
            } else {
                tempRow[SIDE - i + j - 1] = 0;
            }
        }

        int n = 0;

        for (int i = 0; i < SIDE; i++) {
            if (tempRow[i] == row[i]) {
                n++;
            }
        }
        if (n == SIDE) {
            return false;
        } else {
            row = tempRow;
            return true;
        }
    }