def CreateMaze(): g = GWindow(GWINDOW_WIDTH, GWINDOW_HEIGHT) maze = Maze(MAZE_ROWS, MAZE_COLS, SQUARE_SIZE) x = (g.getWidth() - maze.getWidth()) / 2 y = (g.getHeight() - maze.getHeight()) / 2 createRandomMaze(maze) g.add(maze, x, y)
def CreateMaze(): maze = Maze(MAZE_ROWS, MAZE_COLS, SQUARE_SIZE) x = (g.getWidth() - maze.getWidth()) / 2 y = (g.getHeight() - maze.getHeight()) / 2 createRandomMaze(maze) g.add(maze, x, y)
def CreateMaze2(): g = GWindow(GWINDOW_WIDTH, GWINDOW_HEIGHT) maze = Maze(MAZE_ROWS, MAZE_COLS, SQUARE_SIZE) x = (g.getWidth() - maze.getWidth()) / 2 y = (g.getHeight() - maze.getHeight()) / 2 #createRandomMaze(maze) #g.add(maze, x, y) #g.setInterval(g.add(wall.setColor("Black")), 2000) walls = maze.getWalls() random.shuffle(walls) squares = maze.getSquares() for square in squares: square.setColor(randomColor()) for wall in walls: updateMaze(maze, wall, g)