Commit 681fa0ab by BellCodeEditor

save project

parent b8d4c02f
Showing with 7 additions and 2 deletions
......@@ -7,4 +7,9 @@ class Hero():
def updata(self):
self.level = self.level+1
self.hp = self.hp+50
self.attack = self.attack+5
\ No newline at end of file
self.attack = self.attack+5
yanse = Hero("亚瑟",300,24)
print(yanse.hp)
yanse.updata()
print(yanse.hp)
\ 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