Ejemplo n.º 1
0
	def info(self):

		while True:
			functions.clear_screen()
			functions.pyramid_logo()
			functions.greeting()
			selection_menu = functions.list_items(self.description,self.menu)
			
			answer = functions.prompt()
			
			if answer in selection_menu:
				selection_menu.get(answer).info()
			#check answer against the exit tuple and runs a shutdown sequence if true.
			if answer in functions.exit_tuple:
				functions.countdown("\nSHUTTING DOWN APPLICATION.\n","",4)
				sys.exit("\nUSER TERMINATED APPLICATION.\n")
			#checks answer for reboot sequence. 
			if answer == "reboot":
				functions.countdown("USER INITIALIZED REBOOT","REBOOTING",4)
				functions.greeting(.09)
			if answer == "return":
				break
			
			else:
				print("response invalid.")
				continue
Ejemplo n.º 2
0
	def print_overview(self,line_cap = 82):
		functions.clear_screen()
		functions.pyramid_logo()
		'''method to print dictionary containing overview information'''
		while True:
			functions.clear_screen()
			functions.pyramid_logo()
			print("=" * 82)
			print(self.name.title() + " Overview: ")
			print("=" * 82)			
			for k, v in self.overview.items():
				print(k + v)
			
			answer = input("\npress enter to return\n")
			return answer 
Ejemplo n.º 3
0
	def info(self):
		while True:
			"""method to print info about the region."""
			functions.clear_screen()
			functions.pyramid_logo()
			#prints information from object. 
			print(
				"=" * 80
				+"\nGalactic power: \n"
				+ self.title
				+ "\n" + "=" * 80
				+"\n\n SYNOPSIS: \n\n"
				+ self.synopsis 
				+ "\n\n HISTORY: \n\n"
				+ self.history 
				+"\n\n"
				)
			if self.sectors:
				selection_menu = functions.list_items(str(self.name + " sectors"),self.sectors.items())
				answer = input("Select Index number for more information: ")
				if answer in selection_menu:
					selection_menu.get(answer).info()
					
				elif answer in functions.exit_tuple:
					functions.countdown("\nSHUTTING DOWN APPLICATION.\n","",4)
					sys.exit("\nUSER TERMINATED APPLICATION.\n")
				#checks answer for reboot sequence. 
				
				elif answer == "reboot":
					functions.countdown("USER INITIALIZED REBOOT","REBOOTING",4)
					functions.greeting(.09)
				else:
					return answer
			else:
				print("=" * 80 + "\n" + "This OBJECT contain \"NULL VALUE\"" + "\n" + "=" * 80 + "\n")
				answer = input("enter RETURN to go back: ")
								
				if answer in functions.exit_tuple:
					functions.countdown("\nSHUTTING DOWN APPLICATION.\n","",4)
					sys.exit("\nUSER TERMINATED APPLICATION.\n")
				#checks answer for reboot sequence. 
				
				elif answer == "reboot":
					functions.countdown("USER INITIALIZED REBOOT","REBOOTING",4)
					functions.greeting(.09)
				else:
					return answer
Ejemplo n.º 4
0
	def print_more(self,line_cap = 82):

		'''method to print dictionary containing more information'''
		while True:
			index = 0
			functions.clear_screen()
			functions.pyramid_logo()
			print("=" * 82)
			print(self.name.title() + " resources")
			print("=" * 82)
			print("*" * 82)			
			for k, v in self.more.items():
				
				print(k + v)
				input("\nENTER>>\n")
					
			answer = input("\npress enter to return\n")
			return answer
Ejemplo n.º 5
0
	def info(self,line_cap = 82):
		"""method to print statistics on planet."""
		name = str(" Name: " + self.name)
		region = str(" Region: " + self.region + " ")
		s_hex = str(" System Hex: " + self.s_hex + " ")
		atmo = str(" Atmosphere: " + self.atmo + " ")
		temp = str(" Temperature: " + self.temp + " ")
		biosphere = str(" Biosphere: " + self.biosphere + " ")
		population = str(" Population: " + self.population + " ")
		tech_level = str(" Tech Level: " + self.tech_level + " ")
		title_bar = ("=" * line_cap)
		while True:
			functions.clear_screen()
			functions.pyramid_logo()
			#creates title bar
			print(title_bar)
			print(name + " " * (line_cap - (len(name) + len(region))) + region) 
			print(title_bar + "\n")
		
		
			#format information for atmo and system Hex.
		
			print(
				" " 
				+ "*" * (len(atmo) + 2) 
				+ " " * (line_cap - (len(atmo) + len(s_hex) + 3)) 
				+ "*" * (len(s_hex) + 2)
				)
			
			print(
				" *" 
				+ atmo
				+ "*" 
				+ " " * (line_cap - (len(atmo) + 3
				+ len(s_hex))) 
				+ "*" 
				+ s_hex
				+ "*"
				)
				
		
			print(
				" "
				+ "*" * (len(atmo) + 2)
				+ " " * (line_cap - (len(atmo) + len(s_hex) + 3))
				+ "*" * (len(s_hex) + 2)
				)
		
			print("\n")
		
			#formats Temperature and Biosphere information.
			
			print(" " + "*" * (len(temp) + 2)
			+ " " * (line_cap - (len(temp) + len(biosphere) + 3))
			+ "*" * (len(biosphere) + 2)
			)
		
			print(
				" *" 
				+ temp 
				+ "*" 
				+ " " * (line_cap - (len(temp) + 3 + len(biosphere))) 
				+ "*" 
				+ biosphere
				+ "*"
				)
			
			print(
				" "
				+ "*" * (len(temp) + 2)
				+ " " * (line_cap - (len(temp) + len(biosphere) + 3))
				+ "*" * (len(biosphere) + 2)
				)
					
			print("\n")	
		
			#format populaiton and Tech_level
			print(
				" " 
				+ "*" * (len(population) + 2) 
				+ " " * (line_cap - (len(population) + len(tech_level) + 3)) 
				+ "*" * (len(tech_level) + 2)
				)
		
			print(
				" *" 
				+ population
				+ "*" 
				+ " " * (line_cap - (len(population) + 3 + len(tech_level))) 
				+ "*" 
				+ tech_level
				+ "*"
				)
			
		
			print(
				" "
				+ "*" * (len(population) + 2)
				+ " " * (line_cap - (len(population) + len(tech_level) + 3))
				+ "*" * (len(tech_level) + 2)
				)
			
			print("\n") 
			
			print(
				"=" * line_cap 
				+ "\n" 
				+ "Enter Overview for more detailed information if available.\nEnter More for a list of available resources."
				+ "\n"
				+ "=" * line_cap
				)
			
			answer = functions.prompt("\n: ")
				
			#check answer against the exit tuple and runs a shutdown sequence if true.
			if answer in functions.exit_tuple:
				functions.countdown("\nSHUTTING DOWN APPLICATION.\n","",4)
				sys.exit("\nUSER TERMINATED APPLICATION.\n")
			#checks answer for reboot sequence. 
			if answer == "reboot":
				functions.countdown("USER INITIALIZED REBOOT","REBOOTING",4)
				functions.greeting(.09)
			if answer == "overview":
				self.print_overview()
			if answer == "more":
				self.print_more()
			if answer == "return":
				break
				
			else:
				print("response invalid.")
				continue
    
    

    
    
#end of system class