import sas_pygame as sas
R1 = 49
R2 = 6

view = sas.createView(600, 400, "white", "Sprite")
roehre = sas.Rectangle(0, 250, 580, 100,"green");
ball1 = sas.Circle(50, 251, R1, "blue")
cx, cy = ball1.getCenterX(), ball1.getCenterY()
ball2 = sas.Circle(int(cx + R1 - 2*R2), int(cy-R2), R2, "yellow")  
rad = sas.Sprite(ball1)
rad.add(ball2)
stop = False
while view.running:     
    view.step()
    if not stop:
        rad.move(3, 0)  
        cx, cy =  ball1.getCenterX(), ball1.getCenterY()
        ball2.turn(cx, cy, 5) 
    if not roehre.contains(rad):
        stop = True
view.quit()