private void dragCell (int i, int j) {
        if (!(alg.getCell(i, j) instanceof EmptyCell)) {
            return;
        }

        if (draggedCell instanceof StartCell) {
            alg.setStartCell(new Point(i, j));

        } else if (draggedCell instanceof EndCell) {
            alg.setEndCell(new Point(i, j));
        }
    }