public void calcRoute(){
    //directions = new ArrayList<Direction>();
    Collections.sort(rIndex);
    int myPos = (int)this.location.getX() + ((int)this.location.getY() * stage.getMatrix_width());
    int pacPos = stage.getPacman_location();
    if(myPos >= pacPos){
        Collections.reverse(rIndex);
    }
    int size = rIndex.size();
    for(int i = 0; i < size-1; i++){
        int me = rIndex.get(i);
        int next = rIndex.get(i+1);
        if(me == next){
            continue;
        }
        if(me < next){
            if(me + 1 == next){
                this.pacman_direction = Direction.RIGHT;
                System.out.print("Derecha ");
            } else {
                this.pacman_direction = Direction.DOWN;
                System.out.print("Abajo ");
            }              
        }
        if(me > next){
            if(me == next + 1){
                this.pacman_direction = Direction.LEFT;
                System.out.print("Izquierda ");
            } else {
                this.pacman_direction = Direction.UP;
                System.out.print("Arriba ");
            }
        }
    }
    System.out.println();
  }