def get_new_maze(height, width, nfood=30, seed=None, dead_ends=False):
    """Create a new maze in text format.

    The maze is created with a recursive creation algorithm. The maze part of
    the blue team is a center-mirror version of the one for the red team.

    The function reserves space for 2 PacMan for each team in upper-right
    and lower-left corners of the maze. Food is added at random.

    Input arguments:
    height, width -- the size of the maze, including the outer walls
    nfood -- number of food dots for each team
    seed -- if not None, the random seed used to generate the maze
    dead_ends -- if False, remove all dead ends in the maze
    """

    if seed is None:
        seed = numpy.random.randint(1, 2 ** 31 - 1)
    numpy.random.seed(seed)

    maze = empty_maze(height, width)
    create_half_maze(maze, height // 2)

    # make space for pacman (2 pacman each)
    maze[-2, 1] = E
    maze[-3, 1] = E

    # remove dead ends
    if not dead_ends:
        remove_all_dead_ends(maze)

    # complete right part of maze with mirror copy
    maze[:, width // 2:] = numpy.flipud(numpy.fliplr(maze[:, :width // 2]))

    # add food and pacman
    add_pacman_stuff(maze, max_food=2 * nfood)
    return maze_to_str(maze)
dataset/ETHPy150Open ASPP/pelita/layouts/maze_generator.py/get_new_maze/original