Commit 23aca756 by BellCodeEditor

save project

parent 2204cf31
Showing with 2 additions and 1 deletions
......@@ -4,10 +4,11 @@ class Hero:
self.hp=hp
self.attack=attack
self.name=name
def updata():
def updata(self):
self.level+=1
self.hp+=100
self.attack+=30
yase=Hero("椏瑟",300,30)
yase.updata()
print(yase.hp)
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