Beispiel #1
0
def selectNation(NATION_ARRAY):
    clearScreen()
    NationChoice = ''
    nationSelected = ''
    while nationSelected != 'Y':
        print('')
        print('Printing nation list')
        print('')

        for x in range(0, len(NATION_ARRAY)):
            print(str(x) + '. ' + str(NATION_ARRAY[x][-1]))
        print('')
        while NationChoice not in range(0, len(NATION_ARRAY)):
            try:
                NationChoice = int(input('Please chose a country \n'))
            except:
                print("Entered incorrectly, please try again")

        fast_print('Your chosen country is : ' +
                   str(NATION_ARRAY[NationChoice][-1]) + '\n')
        print('')
        buffer = input('Press any button to continue \n')
        clearScreen()
        myNation = NATION_ARRAY[NationChoice]
        myNationIndex = NationChoice
        nationSelected = 'Y'
    return (myNation, myNationIndex)
Beispiel #2
0
def nextYear(year, myNation, NATION_ARRAY, myNationIndex):
    clearScreen()
    fast_print('Processing next year....')
    print('')

    # ITERATE FOR EACH TEAM
    for x in range(0, len(NATION_ARRAY)):
        currentNation = NATION_ARRAY[x]
        index = x

        # AI TEAM DECISION
        if currentNation != myNation:
            NATION_ARRAY = setAIMoves(index, currentNation, NATION_ARRAY)

        # ACTION CARRIED OUT FOR ALL USERS
        NATION_ARRAY = action(index, currentNation, NATION_ARRAY, p,
                              myNationIndex)

    # Only talling scores at the end....may need to change
    print('Tallying scores')
    NATION_ARRAY = tallyScores(NATION_ARRAY)
    NATION_ARRAY = defaultNextStep(NATION_ARRAY)

    UPDATE_WEALTH_VALUATION = ' TO BE COMPLETED'

    year = year + 1
    print('*Hint* You can change how much you see in the options menu')
    print('')
    print('')
    buffer = input('Press any button to continue')
    return (year, NATION_ARRAY)
Beispiel #3
0
def tradeMenu(myNation,year):
	clearScreen()
	financeSelection = ' '
	while financeSelection != '':
		print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		print('         $$$$  TRADE EXCHANGE   $$$$$            ')
		print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		print('')
		print('My Team: ' + str(myNation[1]))
		print('Year: ' + str(year))
		print('Wealth : ' + str(myNation[0]['Finance']['wealth']))
		print('')
		print('Gold        : ' + str(myNation[0]['Finance']['gold']))
		print('Gems        : ' + str(myNation[0]['Finance']['gems']))
		print('Rare Metals : ' + str(myNation[0]['Finance']['raremetals']))
		print('Oil         : ' + str(myNation[0]['Finance']['oil']))
		print('')
		print('[1] Buy')
		print('[2] Sell')
		print('[3] Exit')
		print(' ')
		print(' ')
		print('***************************************************')
		print(' ')
		print(' ')
		financeSelection = str(input('Please chose an option \n'))
		print(financeSelection)
		if financeSelection == '1':
			myNation = buyMenu(myNation,year)
		if financeSelection == '2':
			fast_print('Chose to sell')
		if financeSelection == '3':
			print('exiting...')
			return(myNation)
Beispiel #4
0
def buyMenu(myNation,year):
	financeSelection = ' '
	while financeSelection != '':
		clearScreen()
		# print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		# print('         💰💰💰  BUY BUY BUY      💰💰💰💰     ')
		# print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		print('            £££  BUY BUY BUY     $$$             ')
		print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		print('')
		print('My Team: ' + str(myNation[1]))
		print('Year: ' + str(year))
		print('Wealth : ' + str(myNation[0]['Finance']['wealth']))
		print('Stash: ' + str(myNation[0]['Finance']['gold']) + ' : ' + str(myNation[0]['Finance']['gems']) + ' : ' + str(myNation[0]['Finance']['raremetals'])  + ' : ' + str(myNation[0]['Finance']['oil'])  ) 
		print('')
		print('Gold        : ' + '$200')
		print('Gems        : ' + '$300')
		print('Rare Metals : ' + '$20')
		print('Oil         : ' + '$10')
		print('')
		print('[1] Buy Gold')
		print('[2] Buy Gems')
		print('[3] Buy Metals')
		print('[4] Buy Oil')
		print('')
		print('')
		print('[R] Return')
		#print('[M] Main Menu')
		print(' ')
		print(' ')
		print('***************************************************')
		print(' ')
		print(' ')
		fast_print('These features are not ready yet....sorry :( \n')
		financeSelection = str(input('Please chose an option \n'))
		print(financeSelection)
		if financeSelection == '1':

			# buy funcion 
			# (item, price, credits)
			# max = round(credits/price) down
			# input('How many do you want to buy? ' )
			fast_print('Bought Gold')
			print('')
		if financeSelection == '2':
			fast_print('Bought Gems')
			print('')
		if financeSelection == '3':
			fast_print('Bought metals')
			print('')
		if financeSelection == '4':
			fast_print('Bought Oil')
			print('')
		if financeSelection == 'R' or financeSelection == 'r':
			return(myNation)
		if financeSelection == 'M' or financeSelection == 'm':
			print('exiting...') 
			return(myNation)
Beispiel #5
0
def gambleMenu(myNation,year):
	clearScreen()
	print('My Team: ' + str(myNation[1]))
	print('Year: ' + str(year))
	print('Trade Credits: ' + str(myNation[0]['Finance']['wealth']))
	print(' ')
	print('')
	
	
	flag = 0
	creditsAvailable = int(myNation[0]['Finance']['wealth'])
	gambleAmount = 0

	if creditsAvailable < 1:
		print('you do not have enough credits, sorry')
		flag = 1

	if flag == 1:
		print('you do not have enough credits, exiting, sorry')
		return(myNation)

	fast_print('How much do you wish to gamble? \n')
	while gambleAmount < 1:
		try:
			gambleAmount = int(input('Input amount between 1 and ' + str(creditsAvailable) + '\n'))
		except:
			print("Entered incorrectly, please try again")
	
	if gambleAmount > creditsAvailable:
		fast_print('Entered too much')
		return(myNation)

	# Decrement wealth now.
	myNation[0]['Finance']['wealth'] = myNation[0]['Finance']['wealth'] - gambleAmount
	myNation[0]['Nextmove'] = 'gamble',gambleAmount
	print('You will gamble ' + str(myNation[0]['Nextmove'][1]) + ' in the next round')
	buffer = input('press any key to continue')
	skipflag = 'y'
	return(myNation)
Beispiel #6
0
	print('[5] Credits')
	print('[6] JukeBox')
	print('[7] Back')
	print('')
	print('')


	try:
		selection = int(input('Please chose an option \n'))
	except:
		print("Entered incorrectly, please try again")

	if selection == 1:
		if myNation == '':
			myNation,myNationIndex =selectNation(NATION_ARRAY)
		fast_print('Starting game... \n')
		clearScreen()
		break
	if selection == 2:
		myNation,myNationIndex = selectNation(NATION_ARRAY)
	if selection == 3:
		stats(NATION_ARRAY)
	if selection == 4:
		fast_print('The aim of the game is to gain the most points before the year 2100. \n')
		fast_print('This can be by winning on trade, military, culture or other. \n')
		fast_print('Remember, every action has its own consequence! \n')
		fast_print('Good Luck commander! \n' )
		buffer = input('Press enter to continue \n ')
		clearScreen()
	if selection == 5:
		fast_print('All credits go to Adam McMurchie... me! . \n')
Beispiel #7
0
def politicalCabinet(NATION_ARRAY):
    fast_print('This feature is not ready yet...')
Beispiel #8
0
def start(userName, myNation):
    assistant = 'Arbiter: '
    fast_print('**rustle**....**clunk** ..."oh not again!" \n')
    fast_print(str(assistant) + '....wait... \n')
    time.sleep(0.7)
    fast_print(
        str(assistant) +
        '..who the hell are you? How did you get in here? ... \n')

    userName = input('Enter your name \n')
    print(' ')
    med_print(str(userName) + ': ... im ' + str(userName) + '\n')

    fast_print(str(assistant) + 'ah, so YOU are the one. \n')
    time.sleep(0.4)
    fast_print(
        str(assistant) + 'Its truly an honour to meet you ' + str(userName) +
        ' please know that we all appreciate your sacrifice  \n')
    fast_print(str(assistant) + '...are you ready?  \n ')
    print('')
    input(' Press any key to start..')
    fast_print(
        str(assistant) +
        'executing dynamic cascade sequence now, this should feel... uh..uh....  \n '
    )
    time.sleep(0.6)
    fast_print('....a little weird \n ')
    time.sleep(1.50)
    clearScreen()
    time.sleep(1.50)

    for y in range(0, 3):
        for x in range(0, 10):
            print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
        time.sleep(0.50)
    fast_print('..........universe destruction in progress......\n')
    for x in range(0, 10):
        print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
    time.sleep(0.50)
    for x in range(0, 10):
        print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
    time.sleep(0.50)
    for x in range(0, 10):
        print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
    fast_print('....booting up universe simulation #16725 omega .......\n')
    for y in range(0, 3):
        for x in range(0, 10):
            print('><><><>><><><>><><><>><><><>><><><>><><><>><><><>><><><')
        time.sleep(0.50)
    time.sleep(0.580)
    for y in range(0, 3):
        for x in range(0, 5):
            print('asklfdj;l;j;adfj;kj;afdkjaklsdjfaghaldg;asdkjf;lkja;ajd')
        time.sleep(0.30)
        for x in range(0, 5):
            print('skakdf 9873472393khgfas lalsdjhf lkladf iuhwer 82348989')
        time.sleep(0.30)
        for x in range(0, 5):
            print('sweir;nvda;eradf jasd;klfjasfjghlaadsljfh lasdhfhdlafdd')
        time.sleep(0.50)
    for y in range(0, 3):
        for x in range(0, 10):
            print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
        time.sleep(0.50)
    clearScreen()
    time.sleep(1.10)
    med_print('....Lead me, follow me, or get out of my way ........ \n')
    print('(George S Patton)')
    time.sleep(1.90)
    clearScreen()
    for x in range(0, 20):
        print(' ')
    time.sleep(0.50)
    print('')
    y = 5
    for x in range(0, 5):
        print(str(y))
        y = y - 1
        time.sleep(1.20)
        clearScreen()

    fast_print('Good morning commander ' + str(userName) + '..... \n')
    fast_print('')
    time.sleep(0.80)
    fast_print(
        'The year is 1949, the devestating and costly war has finally come to an end.\nIt is your responsibility to lead '
        + str(myNation[-1]) + ' to greatness. \n')
    time.sleep(0.80)
    fast_print(
        'There are many ways to win, trade, politics, war....the path is up to you? \n'
    )
    time.sleep(1.50)
    return (userName)
Beispiel #9
0
def politicalCabinet(myNation, year):
    fast_print('This feature is not ready yet...')
    return (myNation)