import pgzrun

TITLE = "Paf l'oiseau"
WIDTH = 400
HEIGHT = 700

titi = Actor('bird1', (300,10))
titi2 = Actor('bird2', (125,75))
pot1 = Actor('top',(300,-100))
pot2 = Actor('bottom',(300,800))

def draw():
    screen.blit('background',(0,0))
    titi.draw()
    titi2.draw()
    pot1.draw()
    pot2.draw()

def on_mouse_down():
    print('Clic souris !')
    titi.backupspeed= titi.speed
    titi2.backupspeed= titi2.speed
    titi.speed = 0
    titi2.speed = 0

def on_mouse_up():
    print('clic souris !')
    titi.speed = titi.backupspeed + 1
    titi2.speed = titi2.backupspeed + 1

def update():
    titi.y += titi.speed
    titi2.x += titi2.speed
    if titi.y > 700 :
        titi.y = 0
    if titi2.x > 400 :
        titi2.x = 0



titi.speed = 1
titi2.speed = 1

pgzrun.go()
