Commit ee372c64 by BellCodeEditor

save project

parent c786961f
Showing with 9 additions and 0 deletions
......@@ -15,6 +15,15 @@ class Hero(object):
else:
info3 = enemy.name + '还剩下' + str(enemy.hp) + '点生命值'
print(info1 + info2 + info3)
class Player(Hero):
def __init__(self, name):
self.level = 1
self.hp = 3000
self.attack = 500
self.name = name
Player=player("后羿")
print("玩家的血量为:",player.hp)
print("玩家的攻击力为:",player.)
......
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