public void bucketHelper(Color c) {
        Point p = q.pop();
        Color curColor = colorArr[p.x][p.y];
        if (curColor.equals(c)) {
            return;
        }
        addDelta(p.x, p.y, c);
        colorArr[p.x][p.y] = c;

        if (p.x > 0 && curColor.equals(colorArr[p.x - 1][p.y])) {
            q.push(new Point(p.x - 1, p.y));

        }
        if (p.x < colorArr[0].length - 1 && curColor.equals(colorArr[p.x + 1][p.y])) {
            q.push(new Point(p.x + 1, p.y));
        }
        if (p.y > 0 && curColor.equals(colorArr[p.x][p.y - 1])) {
            q.push(new Point(p.x, p.y - 1));
        }
        if (p.y < colorArr.length - 1 && curColor.equals(colorArr[p.x][p.y + 1])) {
            q.push(new Point(p.x, p.y + 1));
        }
    }