def get_dir_from_zipfile(zip_file, fallback=None):
    """Return the name of the root folder in a zip file.

    :param zip_file: a :class:`zipfile.ZipFile` instance.
    :param fallback: if `None`, the name of the zip file is used. This is
        returned if the zip file contains more than one top-level directory,
        or none at all.
    """
    fallback = fallback or zip_file.filename
    directories = [name for name in zip_file.namelist() if name.endswith("/")
                   and len(PurePath(name).parts) == 1]
    return fallback if len(directories) > 1 else directories[0]
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