public ArrayList<String> getPossibleDirections(double x, double y, String dir) {
        Rectangle nextLoc = new Rectangle(boundingBox);
        ArrayList<String> directions = new ArrayList<String>();
        if(!dir.equals("up")) {
            if(this.attemptDirection("down", x, y) == true) {
                directions.add("down");
            }
        }
        if(!dir.equals("down")) {
            if(this.attemptDirection("up", x, y) == true) {
                directions.add("up");
            }
        }
        if(!dir.equals("left")) {
            if(this.attemptDirection("right", x, y) == true) {
                directions.add("right");
            }
        }
        if(!dir.equals("right")) {
            if(this.attemptDirection("left", x, y) == true) {
                directions.add("left");
            }
        }
        return directions;
    }