Exemplo n.º 1
0
class Party:
	def __init__(self, number):
		self.partyInfos = PartyInformations(number)
		self.parser = Parser(self.partyInfos)
		while self.parser.tryRead() == False:
			continue
		while True:
			start = timer()
			self.parser.updateInfos()
			if number == 1:
				self.parser.getGhost()
			self.parser.parseTourInfos()
			if self.parser.readQuestion() == False:
				continue
			if self.parser.questionType == self.parser.tileQuestion:
				IA.compute(self.partyInfos)
				end = timer()
				print("time elapsed = " + str(end - start))
			self.parser.sendResponse()