I am creating a 3-band simulator game "billiards" and the problem is that I can limit the movement of the ball to only one side in Python won pygame

0

I'm doing a 3-band simulator game "billiards" and the problem is that I manage to limit the movement of the ball to one side, I enter the rest of the commands and those are no longer executed.

* the instruction that carries an asterisk is the one that does not execute

ventana.blit( roja,recr )
        if (a==1):
            ventana.blit( amarilla,reca )
            reca.centerx  = reca.centerx+xa
            reca.centery  = reca.centery+ya
            if (reca.centerx >930):
                a=2
                cont =cont+1
            if (reca.centery < 80):
                a=3
                cont =cont+1

        if (a==2):
            reca.centerx  = reca.centerx-rxa
            reca.centery= reca.centery-rya
        *if (a==3):*
            reca.centerx  = reca.centerx-1
            reca.centery  = reca.centery+1

a      

        if (c==1):
                ventana.blit( blanca,recb )
                recb.centerx  = 250
                recb.centery  = 250   

        ventana.blit( t1,(rect1 ))

        pygame.display.flip()
    
asked by L Adriana 25.07.2018 в 01:53
source

0 answers