public void boxBehavior(double x, double y) {
        if(this.canLeaveBox()) {    // If Ghost can leave, guide Ghost towards exit
            if(coordX > 0) {
                velX = -1; velY = 0;
            } else if(coordX < 0) {
                velX = 1; velY = 0;
            } else if(coordY > -36) {
                velX = 0; velY = -1;
            }
            this.updateCoordinates(x,y);
            if(coordX == 0 && coordY == -36) {
                isOutOfBox = true;
                room.resetDotTimer();
            }
        } else {
            if(coordY == -30) {
                velY = 1;
            } else if(coordY == -25) {
                velY = -1;
            }
            this.updateCoordinates(x,y);
        }
    }