public double checkSpeed() {
        double dx = this.getDeltaX("BALL");
        speedX = hitCounter * 0.3;
        if(dx < 0) {
            dx = -speedX;
        }
        if(dx > 0) {
            dx = speedX;
        }
        if(dx == 0) {
            dx = 0.3;
        }
        return dx;
        
    }