Commit cad3db7e by BellCodeEditor

save project

parent a850d88f
Showing with 9 additions and 9 deletions
...@@ -5,16 +5,16 @@ class Hero: ...@@ -5,16 +5,16 @@ class Hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def s(): def s(self):
yase.level=yase.level+1 self.level=self.level+1
yase.hp=yase.hp+50 self.hp=self.hp+50
yase.attack=yase.attack+4 self.attack=self.attack+4
yase = Hero('yase',300,20) houyi = Hero('houyi',300,20)
print('血量',yase.hp) houyi.s()
s() print('1',houyi.level)
s() print('2',houyi.hp)
print('2血量',yase.hp) print('3',houyi.attack)
#hy=Hero('hy',250,23) #hy=Hero('hy',250,23)
#k=Hero('K',5600,199) #k=Hero('K',5600,199)
#print(yase.attack) #print(yase.attack)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment