Commit c06bcc94 by BellCodeEditor

save project

parent f5fe770d
Showing with 7 additions and 3 deletions
......@@ -4,7 +4,11 @@ class Hero:
self.level = 1
self.attack = attack
self.name = name
def upgrade():
yase.level+=1
yase.hp+=50
yase.attack+=4
yase = Hero(300,20,'亚瑟')
houyi = Hero(240,23,'后羿')
upgrade()
upgrade()
print(yase.hp)
\ No newline at end of file
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