Commit 53187bea by BellCodeEditor

save project

parent de9a0435
Showing with 8 additions and 6 deletions
......@@ -4,12 +4,13 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def ShengJi(self):
self.level=self.level+1
self.hp=yase.hp+50
self.attack=yase.attack+4
yaes=Hero('yase',300,20)
yase=Hero('yase',300,20)
def ShengJi():
yase.level=self.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+4
print(yase.attack)
ShengJi()
yase.ShengJi()
print(yase.attack)
\ No newline at end of file
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