def add_pacman_stuff(maze, max_food):
    """Add PacMen and food. """

    h, w = maze.shape

    ## starting pacmen positions
    maze[-2, 1] = '2'
    maze[-3, 1] = '0'
    maze[1, -2] = '3'
    maze[2, -2] = '1'

    ## random food
    total_food = 0
    while total_food < max_food:
        row = numpy.random.randint(1, h - 1)
        col = numpy.random.randint(1, (w // 2) - 1)
        if (row > h - 6) and (col < 6): continue
        if maze[row, col] == E:
            maze[row, col] = F
            maze[h - row - 1, w - col - 1] = F
            total_food += 2
dataset/ETHPy150Open ASPP/pelita/layouts/maze_generator.py/add_pacman_stuff/original