public void move(){

        y -= dy;
        x += dx;
        if(y <= MAX_TOP) y = MAX_TOP;
        if(y >= MAX_BOTTOM) y = MAX_BOTTOM;
        if(x <= MIN_LEFT) x = MIN_LEFT;
        if(x >= MAX_RIGTH) x = MAX_RIGTH;
        if (layer2 - v <=0){
            layer1 = 0;
            layer2 = 1000;
        }
        layer1 -= v;
        layer2 -= v;
    }