public void move() {  //la miscarea automobilului, distanta creste, drumul de misca proportional distantei;
        distance += speed;
        speed += acceleration;
        if (speed > MAX_SPEED) speed = MAX_SPEED;
        if (speed <= MIN_SPEED) speed = MIN_SPEED;

        pozY += deltaY;
        if (pozY <= MAX_TOP) pozY = MAX_TOP;
        if (pozY >= MAX_BOTTOM) pozY = MAX_BOTTOM;

        if (backgroundLayer2 - speed <= 0) { //schimbam bucatile de drum in ciclu;
            backgroundLayer1 = 0;
            backgroundLayer2 = MAX_WIDTH_IMG;
        } else {
        backgroundLayer1 -= speed;
        backgroundLayer2 -= speed;
        }
    }