I am trying to make a python maze generator but I keep getting an IndexError: list index out of range. Any ideas? I'm kinda new to this stuff so I was using the code from rosetta code on maze generation. I am not painting the maze right now I just want the algorithm to work right now.
from random import shuffle, randrangemaze_rows = 10
maze_columns = 10maze = [[0 for rows in range(maze_rows)] for columns in range(maze_columns)]def maze_generation(x,y):maze[y][x] = 1walk = [(x - 1, y), (x, y + 1), (x + 1, y), (x, y - 1)]shuffle(walk)for (xx, yy) in walk:if maze[yy][xx]: continueif xx == x:maze[max(y,yy)][x] = 1if yy == y:maze[y][max(x,xx)] = 1maze_generation(xx,yy)maze_generation(randrange(maze_rows),randrange(maze_columns))