Commit 0e29b71e by BellCodeEditor

save project

parent b8718554
Showing with 17 additions and 2 deletions
...@@ -5,8 +5,23 @@ class Hero: ...@@ -5,8 +5,23 @@ class Hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Hero('yase',300,20) yase=Hero('yase',300,20)
hy=Hero('hy',240,23) hp=Hero('hp',240,23)
print(yase x w:",yase.hp) print(yase x w:",yase.hp)
print(h x w:",houyi.hP) print(h x w:",houyi.hP)
def upgrade()
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+4
upgrade()
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