Commit 3513f971 by BellCodeEditor

save project

parent 8ce50f28
Showing with 12 additions and 1 deletions
......@@ -14,4 +14,15 @@ def combat(self,enemy):
info=info1+info2+info3
print(info)
else:
info3=enemy.name
info3=enemy.name+'阵亡,游戏结束'
info=info1+info2+info3
print(info)
exit()
class Player(Hero):
def __init__(self,name):
super().__init__(name)
self.hp=200
self.attck=50
Player=Player('houyi')
print('wanjiadexueliangzhiwei:',Player.hp)
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