There are 2 typos:
The parentheses are missing after pygame.display.flip
pygame.display.flip
pygame.display.flip()
The ball is drawn at [self.x,self.x]
rather than [self.x,self.y]
:
pygame.draw.circle(window,self.color,[self.x,self.x],self.radius)
pygame.draw.circle(window,self.color, [self.x, self.y], self.radius)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…