Commit f2b7056c by BellCodeEditor

save project

parent 456e257d
Showing with 4 additions and 0 deletions
import random
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
...@@ -45,3 +46,6 @@ print('——'*40) ...@@ -45,3 +46,6 @@ print('——'*40)
while True: while True:
fight=input('请输入战斗方式(1:攻击. 2:治疗. ):') fight=input('请输入战斗方式(1:攻击. 2:治疗. ):')
print('——'*40) print('——'*40)
if fight='q':
print(' 游戏结束')
break
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