import os,sys,getpass,time,json
都匀网站建设公司成都创新互联公司,都匀网站设计制作,有大型网站制作公司丰富经验。已为都匀千余家提供企业网站建设服务。企业网站搭建\外贸网站制作要多少钱,请找那个售后服务好的都匀做网站的公司定做!
print('*欢迎来到召唤师峡谷')
login_name = input('请输入您的账号:')
lock_file = open('lock_file.txt','r+')
lock_list = lock_file.readlines()
lock = []
for lock_info in lock_list:
lock_info = lock_info.strip('\n')
lock.append(lock_info)
#print(lock)
if login_name in lock:
sys.exit("你的账号被封停,请联系客服")
user_file = open('user_file.txt','r+')
user_list = user_file.readlines()
#user_list = user_list.strip('\n')
user = []
for user_info in user_list:
user_info = user_info.strip('\n')
user_info = user_info.split() #
user.append(user_info)
print(user)
count = 0
b = [x[0] for x in user]
a = [x[1] for x in user]
print(b)
print(a)
if login_name in b:
while count < 3:
login_pwd = input('请输入密码:')
if login_pwd == a[b.index(login_name)]:
sys.exit('即将进入游戏')
else:
count += 1
print('密码错误,请重新输入,你好友%s次机会'%(3-count))
else:
lock_file.write(login_name + '\r\n')
sys.exit('输入次数过多,账号已被绑定')
else:
print('账号不存在')
lock_file.close()
user_file.close()