Exemplo n.º 1
0
def initialize_cells(x=w, y=w, w=20):
    maze = Maze(maze_width, maze_height, w)
    a = 0
    for i in range(w, maze_height + w, w):
        for j in range(w, maze_width + w, w):
            cell = Cell(j,
                        i,
                        w,
                        maze_height=maze_height,
                        maze_width=maze_width,
                        id=a)
            maze.add_cell(cell)
            a += 1
    return maze