Exemple #1
0
    def showdown(self):
        public = self.flop + [self.turn, self.river]
        list1 = self.player1.cards + public
        list2 = self.player2.cards + public
        judge = Judge(list1, list2)
        judge.show()
        winner = judge.compare()

        return winner
Exemple #2
0
	def __init__(self,output='sv_output.txt',level=0):
		super().__init__()
		self.intro = '\nStyle🗜Vise\nType "play" to start a new game.\nType "help" or "?" to list commands.\n'
		self.prompt = '>'
		self.file = None
		started = False
		dead = False
		self.space = "      "
		self.nice_comments = ["Nice!","Impressive.","Solid.","Right on.","Now THAT'S typing.","Yes, make it new!"]
		self.mean_comments = ["*Yawn*","Same old same old.","Is that all you got?","...zzzzz..."]
		self.level2name = {
			0:"EASY",
			1:"MEDIUM",
			2:"HARD",
			3:"EXPERT",
			4:"EVIL"
		}
		self.judge = Judge()
		self.started = False
		##
		##adjustable
		self.output_file = open(output,'a+')
		self.starting_level=level
Exemple #3
0
    fileE = Genera(options.Numbers, options.Range)
    fileStand = Verify(fileE.filename)
    print('next: is time:')
    t = int(round(time.time() * 1000)) - t
    print(t)
    print('ms')  # 微秒级时间戳
if options.Numbers and options.Range and options.ProExFile and options.AnsFile:
    '生成Numbers条有负数结果的算式, 再将其标准化(去除中间过程有负数结果的算式以及/后面有0的非法算式), 输出文件是StandExercises.txt'
    t = time.time()
    fileE = Genera(options.Numbers, options.Range)
    t -= t
    fileStand = Verify(fileE.filename)
    fileA = Answer(options.AnsFile)
    print(str(t) + 'ms')

if options.AnsFile and not options.Numbers:
    '回答-a后面的filename题目文件,并输出结果到Answers.txt文件'
    fileA = Answer(options.AnsFile)

if options.ProExFile and options.Numbers and options.Range and not options.AnsFile:
    '生成Numbers条有负数结果的算式, 生成文件是Exercises.txt'
    fileE = Genera(options.Numbers, options.Range)

if options.JudgeFile and not options.Numbers and not options.Range and not options.ProExFile:
    '-e 接一个用户的答案文件, 并将其和标准答案文件Answers.txt比较'
    FileA = Judge(options.JudgeFile, "Answers.txt")
if options.Numbers:
    print('asdads')

if __name__ == '__main__':
    pass
Exemple #4
0
 def setUp(self):
     self.judge = Judge()