public void selectiveSuccessors(Vector<State> pStates, int pBoxIndex) {

		pStates.clear();
        /* If a move is possible, then add the new state in the pStates vector */
        if (tryMove(boxes.get(pBoxIndex), 'U'))
            if (!reusableStates.isEmpty()) {
                pStates.add(reusableStates.pop());
                pStates.lastElement().changeBoxConfig(this, pBoxIndex, 'U');
            } else {
                pStates.add(new State(this, pBoxIndex, 'U'));
            }
        if (tryMove(boxes.get(pBoxIndex), 'D'))
            if (!reusableStates.isEmpty()) {
                pStates.add(reusableStates.pop());
                pStates.lastElement().changeBoxConfig(this, pBoxIndex, 'D');
            } else {
                pStates.add(new State(this, pBoxIndex, 'D'));
            }
        if (tryMove(boxes.get(pBoxIndex), 'R'))
            if (!reusableStates.isEmpty()) {
                pStates.add(reusableStates.pop());
                pStates.lastElement().changeBoxConfig(this, pBoxIndex, 'R');
            } else {
                pStates.add(new State(this, pBoxIndex, 'R'));
            }
        if (tryMove(boxes.get(pBoxIndex), 'L'))
            if (!reusableStates.isEmpty()) {
                pStates.add(reusableStates.pop());
                pStates.lastElement().changeBoxConfig(this, pBoxIndex, 'L');
            } else {
                pStates.add(new State(this, pBoxIndex, 'L'));
            }

    } // End allSuccessors