import time
import random
class WeGame(object):
def __init__(self, username, sex, boold_num=2000, money=800, agg=0, pre=0):
self.username = username
self.sex = sex
self.boold_num = boold_num
self.money = money
self.agg = agg
self.pre = pre
self.room = None
self.Sword_info = []
self.Sword()
# def __new__(cls, *args, **kwargs):
# return cls.Come_game(cls)
# 初始金币
def Come_game(self):
print("答题得金币,题号有【1、2、3】")
_num = input("请输入你想答得题目(谨慎选择!!!):")
if _num == '1':
print("斐波拉契数列的第20位是多少?")
tmp1 = input("你的答案:")
if tmp1 == '6765':
self.money += 600
else:
self.money += 0
print("回答错误,答案是6765")
print("你的金币为:", self.money)
return self.Sword()
elif _num == '2':
print("英雄联盟中召唤师峡谷的战役中,双方都分有几个位置?")
tmp2 = input("你的答案:")
if tmp2 == '5':
self.money += 600
else:
self.money += 0
print("回答错误,答案是5")
print("你的金币为:", self.money)
return self.Sword()
elif _num == '3':
print("1+1等于几?")
tmp3 = input("你的答案:")
if tmp3 == '2':
self.money += 600
else:
print("你没救了!")
self.money -= 600
print("你的金币为:", self.money)
return self.Sword()
# 武器装备信息
def Sword(self):
print('_' * 50)
print('*' * 50)
print("剑铺:2019/1/13剑铺开张!(七剑下天山)\n"
"武器信息:\n"
"莫问剑:【功】:90,【守】:15,【价】:800¥\n"
"游龙剑:【功】:95,【守】:5 ,【价】:700¥\n"</