这是pygame写的弹力球
运行效果:
========================================================
代码部分:
========================================================
= { : : : : :
size = width,height = 600,500
speed = [1,1 black = 249,130,57
screen =
ball = pygame.image.load( ballrect =
1 event event.type ==
ballrect = ballrect.left < 0 ballrect.right > speed[0] = - ballrect.top < 0 ballrect.bottom > speed[1] = - speed[1
pygame.display.flip()