Commit 2b5ed2c2 by BellCodeEditor

save project

parent bcf98f08
Showing with 12 additions and 10 deletions
...@@ -19,13 +19,15 @@ class Hero(object): ...@@ -19,13 +19,15 @@ class Hero(object):
info=info1+info2+info3 info=info1+info2+info3
print(info) print(info)
exit() exit()
yase = Hero("垭瑟")
houyi= Hero("后羿") class player(Hero):
yase.combat(houyi) def __init__(self,name):
houyi.combat(yase) super().__init__(name)
yase.combat(houyi) self.hp=1
yase.combat(houyi) self.attack=9999999999999999999999999999999999999999999999999999999999999999999
yase.combat(houyi) player=player("傻逼")
yase.combat(houyi) print("玩家的血量为:",player.hp)
yase.combat(houyi) print("玩家的攻击力为:",player.attack)
yase.combat(houyi) com=Hero("旗鼓相当的傻逼")
player.combat(com)
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