|  | @@ -27,7 +27,6 @@ with open('resources.json') as file:
 | 
	
		
			
				|  |  |  WP = WorkProduction()
 | 
	
		
			
				|  |  |  WP.user_level = 80
 | 
	
		
			
				|  |  |  WP.work_exp = 80000 + 200 * 250
 | 
	
		
			
				|  |  | -WP.nation_bonus = True
 | 
	
		
			
				|  |  |  WP.profit_share = 75
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -64,6 +63,26 @@ def print_per_resource():
 | 
	
		
			
				|  |  |              ))
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +def print_per_level():
 | 
	
		
			
				|  |  | +    """Print wages per factory level"""
 | 
	
		
			
				|  |  | +    factory_levels = {}
 | 
	
		
			
				|  |  | +    for resource_name, factories in RESOURCES.items():
 | 
	
		
			
				|  |  | +        for factory in sorted(factories.values(), key=lambda k: k['wage']):
 | 
	
		
			
				|  |  | +            if factory['level'] not in factory_levels:
 | 
	
		
			
				|  |  | +                factory_levels[factory['level']] = {}
 | 
	
		
			
				|  |  | +            factory_levels[factory['level']][resource_name] = factory['wage']
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    for level, resources in factory_levels.items():
 | 
	
		
			
				|  |  | +        print('{},{},{},{},{}'.format(
 | 
	
		
			
				|  |  | +            int(level),
 | 
	
		
			
				|  |  | +            round(resources['uranium']),
 | 
	
		
			
				|  |  | +            round(resources['oil']),
 | 
	
		
			
				|  |  | +            round(resources['diamond']),
 | 
	
		
			
				|  |  | +            round(resources['ore']),
 | 
	
		
			
				|  |  | +        ))
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  def print_all():
 | 
	
		
			
				|  |  |      """Print wages per resource"""
 | 
	
		
			
				|  |  |      factory_dict = all_factories()
 | 
	
	
		
			
				|  | @@ -112,7 +131,8 @@ def main():
 | 
	
		
			
				|  |  |              new_factory['wage'] = calculate_wage(resource_name, new_factory)
 | 
	
		
			
				|  |  |              RESOURCES[resource_name][str(new_factory_id)] = new_factory
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    print_per_resource()
 | 
	
		
			
				|  |  | +    #print_per_resource()
 | 
	
		
			
				|  |  | +    print_per_level()
 | 
	
		
			
				|  |  |      # print_all()
 | 
	
		
			
				|  |  |      # print_factory_list()
 | 
	
		
			
				|  |  |  
 |