def __create_context(self, main_root):
		context_dir = os.path.join(main_root, 'context')
		safe_mkdir(context_dir)

		action_default = {}
		for unit, param in self.__task.data['workflow'].items():
			action_default[unit] = self.__action_mgr.default_config(param['type'])

		navigators = self.__config_mgr.navigator()
		context_format = self.__navigator_mgr.context_format(navigators)

		self.__context_mgr.create_context_file(self.__task.data, action_default, context_format, context_dir)
def init(num_players):
	global MAP_WIDTH,MAP_HEIGHT,N_ITERATIONS,H_RATIO,W_RATIO,MIN_ROOM_SIDE,CENTER_HUB_HOLE,CENTER_HUB_RADIO,MAP_NAME
	MAP_WIDTH=int(500*sqrt(num_players))
	MAP_HEIGHT=MAP_WIDTH
	N_ITERATIONS=log(MAP_WIDTH*100,2)
	H_RATIO=0.49
	W_RATIO=H_RATIO
	MIN_ROOM_SIDE = 32
	CENTER_HUB_HOLE = 32
	CENTER_HUB_RADIO = CENTER_HUB_HOLE-MIN_ROOM_SIDE/2
	MAP_NAME="result%s.png"%MAP_WIDTH