Commit d61fc25e by BellCodeEditor

auto save

parent 4dbc2f61
Showing with 12 additions and 5 deletions
......@@ -17,7 +17,14 @@ class Hero(object):
else:
info3=enemy.name+"阵亡,游戏结束"
info=info1+info2+info3
rint(info)
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
\ No newline at end of file
print(info)
exit()
class player(hero):
def __init__(self,name):
super.__init__()
self.hp=200
self.attack=50
player=player("后羿")
print("玩家血量为:",player.hp)
print("玩家攻击力为:",player.attack)
\ 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