#NEWLINE# def bounce_ball( self , ball ) : #NEWLINE# #INDENT# if self . collide_widget ( ball ) : #NEWLINE# #INDENT# ( vx , vy ) = ball . velocity #NEWLINE# offset = ( ( ball . center_y - self . center_y ) / ( self . height / 2 ) ) #NEWLINE# bounced = Vector ( ( ( - 1 ) * vx ) , vy ) #NEWLINE# vel = ( bounced * 1.1 ) #NEWLINE# ball . velocity = ( bounced . x , ( vel . y + offset ) )