Commit 57f6e5c2 by BellCodeEditor

save project

parent 1c6992aa
Showing with 7 additions and 3 deletions
......@@ -7,5 +7,9 @@ class Hero():
yase = Hero("亚瑟",300,200)
houyi = Hero("后裔",240,240)
print(yase.hp)
print(houyi.hp)
\ No newline at end of file
def upgrade():
yase.level = yase.level + 1
yase.hp = yase.hp + 50
yase.attack = yase.attack + 20
upgrade()
print(yase.level,yase.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