Commit 75d600a7 by BellCodeEditor

save project

parent 3e5d30ae
Showing with 6 additions and 4 deletions
......@@ -5,6 +5,9 @@ class Hero:
self.hp=hp
self.attack=attack
yese=Hero("亞瑟",300,20)
houyi=Hero("后羿",240,23)
print(houyi.hp)
print(yese.hp)
\ No newline at end of file
def upgrade():
yese.level=yese.level+1
yese.hp=yese.hp+50
yese.attack=yese.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