Commit 5107a2d4 by BellCodeEditor

save project

parent 086fc333
Showing with 1 additions and 1 deletions
...@@ -7,7 +7,7 @@ class Hero: ...@@ -7,7 +7,7 @@ class Hero:
def upgrade(self): def upgrade(self):
self.level=self.level+1 self.level=self.level+1
self.name=self.name+200 self.name=self.name+200
self.attack=self.attack+=4 self.attack+=4
houyi=Hero('houyi',1,300,20) houyi=Hero('houyi',1,300,20)
houyi=upgrade() houyi=upgrade()
print(houyi.level) print(houyi.level)
......
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