Commit 6667f5d3 by BellCodeEditor

save project

parent d922a6ee
Showing with 2 additions and 18 deletions
...@@ -16,21 +16,4 @@ class Hero: # 英雄类 ...@@ -16,21 +16,4 @@ class Hero: # 英雄类
info = info1+info2+info3 info = info1+info2+info3
print(info) print(info)
else: else:
info3 = enemy.name+"阵亡,游戏结束" info3 = enemy.name+"阵亡,游戏结束"0
info = info1+info2+info3 \ No newline at end of file
print(info)
exit()
class Player(Hero): # 玩家英雄
def __init__(self,name):
super().__init__(name)
self.attack=100
self.hp=100
self.attack=100
print("玩家的血量值为:",self.hp)
print("玩家的攻击力为:",self.attack)
player = 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