Example #1
0
def beginGameGod():
	while True:
		printMenu()
		cmd = raw_input(bcolors.OKRED + "At your command: " + bcolors.ENDC)
		cmd = cmd.strip()
		if (cmd.startswith('q')):
			print ('quitting')
			quit()
		elif ('v' in cmd):
			try:
				players = list(map(lambda x: getPlayer(x), cmd.split('v')))
			except:
				Error('Bad Input')
				continue
			game.startWar(players[0], players[1])
Example #2
0
def beginGameGod():
	while True:
		printMenu()
		cmd = raw_input(bcolors.OKRED + "At your command: " + bcolors.ENDC)
		cmd = cmd.strip()
		if (cmd.startswith('q')):
			print ('quitting')
			quit()
		elif ('v' in cmd):
			try:
				players = list(map(lambda x: getPlayer(x), cmd.split('v')))
			except:
				Error('Bad Input')
				continue
			game.startWar(players[0], players[1])
Example #3
0
def beginGameGod():
	x=20
	while x:
		x-=1
		printMenu()
		# cmd = raw_input(bcolors.OKRED + "At your command: " + bcolors.ENDC)
		cmd = '1v2'
		cmd = cmd.strip()
		if (cmd.startswith('q')):
			print ('quitting')
			quit()
		elif ('v' in cmd):
			try:
				players = list(map(lambda x: getPlayer(x), cmd.split('v')))
			except:
				Error('Bad Input')
				continue
			res = game.startWar(players[0], players[1], config['gameN'])
			f1 = open('results.txt','a')
			f1.write(str(res[0])+"\t"+str(res[1])+"\n")
			f1.close()