@Override
    public List<GenericState> getNextStates() {
        int row = this.position.getRow();
        int col = this.position.getCol();
        List<GenericState> nextStates = new ArrayList<>();
        for (int i = 0; i < Main.MOVES.length; i++) {
            Position newPos = new Position(row + Main.MOVE_Y[i], col + Main.MOVE_X[i]);
            Position newPosOpposite = new Position(row - Main.MOVE_Y[i], col - Main.MOVE_X[i]);
            if (Main.isValidPosition(newPos) && 
                    Main.isValidPosition(newPosOpposite) && 
                    Main.isEmptyPosition(newPos) && 
                    Main.isEmptyPosition(newPosOpposite)
                        &&Main.isSafePosition(newPos) ) {
                nextStates.add(new BoxState(newPos, new StringBuilder(path).append(Main.MOVES[i]).toString(), this.goal));
            }
        }
        return nextStates;
    }