Commit 970285d9 by BellCodeEditor

save project

parent b9478d69
Showing with 4 additions and 5 deletions
...@@ -3,11 +3,10 @@ class Hero: ...@@ -3,11 +3,10 @@ class Hero:
self.level=level self.level=level
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Hero(1,300,20)
houyi=Hero(1,250,23)
print(houyi.hp)
def upgrade(self): def upgrade(self):
self.hp=self.hp+200 self.hp=self.hp+200
self.level=self.level+1 self.level=self.level+1
self.attack=self.attack+30 self.attack=self.attack+30
yase=Hero(1,300,20)
\ No newline at end of file houyi=Hero(1,250,23)
print(houyi.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