这篇文章详解关于python面向对象初探示例代码
import random
class sprite:
step = [-2,+2,-3,+3]
def __init__(self,gm,point=none):
self.gm = gm
if point is none:
self.point = random.randint(0,20)
else:
self.point = point
def jump(self):
astep = random.choice(sprite.step)
if 0