Commit e9fdb6a7 by BellCodeEditor

save project

parent 2b30d34e
Showing with 9 additions and 4 deletions
...@@ -4,6 +4,12 @@ class Hero: ...@@ -4,6 +4,12 @@ class Hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Hero("亚瑟",200,150) yase=Hero("亚瑟",200,150)
houyi=Hero("后羿",150,200) def upgrade()
print(yase.hp) self.hp=self.hp+100
print(houyi.hp) self.attack=attack+50
\ No newline at end of file upgrade()
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