|  | @@ -23,13 +23,11 @@ RESOURCES = None
 | 
	
		
			
				|  |  |  with open('resources.json') as file:
 | 
	
		
			
				|  |  |      RESOURCES = json.load(file)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  WP = WorkProduction()
 | 
	
		
			
				|  |  |  WP.user_level = 80
 | 
	
		
			
				|  |  |  WP.work_exp = 80000 + 200 * 250
 | 
	
		
			
				|  |  |  WP.profit_share = 75
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  def calculate_wage(resource_name, factory):
 | 
	
		
			
				|  |  |      """Calculate production"""
 | 
	
		
			
				|  |  |      if 'fixed_wage' in factory:
 | 
	
	
		
			
				|  | @@ -44,7 +42,6 @@ def calculate_wage(resource_name, factory):
 | 
	
		
			
				|  |  |      WP.calculate()
 | 
	
		
			
				|  |  |      return WP.wage() * PRICE[resource_name]
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  def all_factories():
 | 
	
		
			
				|  |  |      """return all factories"""
 | 
	
		
			
				|  |  |      factory_dict = {}
 | 
	
	
		
			
				|  | @@ -52,7 +49,6 @@ def all_factories():
 | 
	
		
			
				|  |  |          factory_dict.update(factories)
 | 
	
		
			
				|  |  |      return factory_dict
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  def print_per_resource():
 | 
	
		
			
				|  |  |      """Print wages per resource"""
 | 
	
		
			
				|  |  |      for resource_name, factories in RESOURCES.items():
 | 
	
	
		
			
				|  | @@ -62,7 +58,6 @@ def print_per_resource():
 | 
	
		
			
				|  |  |                  int(factory['wage']),
 | 
	
		
			
				|  |  |              ))
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  def print_per_level():
 | 
	
		
			
				|  |  |      """Print wages per factory level"""
 | 
	
		
			
				|  |  |      factory_levels = {}
 | 
	
	
		
			
				|  | @@ -76,13 +71,12 @@ def print_per_level():
 | 
	
		
			
				|  |  |      for level, resources in factory_levels.items():
 | 
	
		
			
				|  |  |          print('{},{},{},{},{}'.format(
 | 
	
		
			
				|  |  |              int(level),
 | 
	
		
			
				|  |  | -            round(resources['uranium']),
 | 
	
		
			
				|  |  |              round(resources['oil']),
 | 
	
		
			
				|  |  | -            round(resources['diamond']),
 | 
	
		
			
				|  |  |              round(resources['ore']),
 | 
	
		
			
				|  |  | +            round(resources['uranium']),
 | 
	
		
			
				|  |  | +            round(resources['diamond']),
 | 
	
		
			
				|  |  |          ))
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  def print_all():
 | 
	
		
			
				|  |  |      """Print wages per resource"""
 | 
	
		
			
				|  |  |      factory_dict = all_factories()
 | 
	
	
		
			
				|  | @@ -97,7 +91,6 @@ def print_all():
 | 
	
		
			
				|  |  |              int(100 / top_wage * factory['wage']),
 | 
	
		
			
				|  |  |          ).replace(',', '.'))
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  def print_factory_list():
 | 
	
		
			
				|  |  |      """print all factories"""
 | 
	
		
			
				|  |  |      for resource_name, factories in RESOURCES.items():
 | 
	
	
		
			
				|  | @@ -110,10 +103,8 @@ def print_factory_list():
 | 
	
		
			
				|  |  |                  REGIONS[factory['region_id']]['name'],
 | 
	
		
			
				|  |  |              ))
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  def main():
 | 
	
		
			
				|  |  |      """Main function"""
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      for resource_name, factories in RESOURCES.items():
 | 
	
		
			
				|  |  |          factory = None
 | 
	
		
			
				|  |  |          factory_id = None
 | 
	
	
		
			
				|  | @@ -136,7 +127,6 @@ def main():
 | 
	
		
			
				|  |  |      # print_all()
 | 
	
		
			
				|  |  |      # print_factory_list()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  def print_json(json_text):
 | 
	
		
			
				|  |  |      """Print data to console"""
 | 
	
		
			
				|  |  |      print(json.dumps(json_text, sort_keys=True, indent=4))
 |