예제 #1
0
def stats():
    clearScreen()
    print('Printing nation list')
    print('')
    print('|  Score   |Wealth    |Tech Level|   Name   ')

    rankCounter = []
    for x in range(0, len(NATION_ARRAY)):
        rankCounter.append((NATION_ARRAY[x][0]['Score'], x))
    rankCounter.sort(reverse=True)

    for x in range(0, len(rankCounter)):
        index = rankCounter[x][1]

        score = str(NATION_ARRAY[index][0]['Score'])
        for y in range(0, (10 - len(score))):
            score = score + ' '

        tradeScore = str(NATION_ARRAY[index][0]['Finance']['wealth'])
        for z in range(0, (10 - len(tradeScore))):
            tradeScore = tradeScore + ' '

        techScore = str(NATION_ARRAY[index][0]['Tech']['level'])
        for z in range(0, (10 - len(techScore))):
            techScore = techScore + ' '

        print('|' + score + '|' + tradeScore + '|' + techScore + '|' + '   ' +
              str(NATION_ARRAY[index][-1]))

    buffer = input('Press any button to continue \n')
    clearScreen()
예제 #2
0
def financeBeuro(myNation,year):
	financeSelection = ' '
	while financeSelection != '':
		clearScreen()
		# print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		# print('     WELCOME TO THE FINANCE BEURO    😊💰        ')
		# print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		print('     WELCOME TO THE FINANCE BEURO    ;-)         ')
		print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
		print('')
		print('My Team: ' + str(myNation[1]))
		print('Wealth : ' + str(myNation[0]['Finance']['wealth']) )
		print('Year: ' + str(year))
		print('')
		print('[1] Gamble')
		print('[2] Trade Exchange')
		print('[3] Exit')
		print(' ')
		print(' ')
		print('****************************************')
		print(' ')
		print(' ')
		financeSelection = str(input('Please chose an option \n'))
		print(financeSelection)
		if financeSelection == '1':
			myNation = gambleMenu(myNation,year)
		if financeSelection == '2':
			myNation = tradeMenu(myNation,year)
		if financeSelection == '3':
			print('exiting...')
			break
	return(myNation)
예제 #3
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)
예제 #4
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)
예제 #5
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)
예제 #6
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)
예제 #7
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)
예제 #8
0
파일: test.py 프로젝트: murchie85/gameOfWar
#                           START MENU
#     1. SELECT NATION OPTION
#     2. VIEW COUNTRY
#     3. VIEW RULES
#     4. VIEW CREDITS
#     5. START GAME 
# =====================================================================
# =====================================================================
# =====================================================================
"""



selection = ''
while selection != 'Done':
	clearScreen()
	print('*****************MENU*******************')
	print('')
	print('')
	print('[1] Start Game')
	print('[2] Select your Nation')
	print('[3] Country Stats')
	print('[4] Game rules')
	print('[5] Credits')
	print('[6] JukeBox')
	print('[7] Back')
	print('')
	print('')


	try:
예제 #9
0
파일: intro.py 프로젝트: murchie85/conquest
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)