In [10]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from daedalus import Maze

In [11]:
def make_maze(size, func):
    maze = Maze(*size)
    func(maze)
    return maze

def show_maze(maze):
    print('Maze entrance: {}'.format(maze.entrance))
    print('Maze exit: {}'.format(maze.exit))
    a = np.array(list(maze))
    plt.imshow(-a)

In [12]:
show_maze(make_maze((31,31), Maze.create_perfect))


Maze entrance: (23, 0)
Maze exit: (29, 30)

In [13]:
show_maze(make_maze((31,31), Maze.create_braid))


Maze entrance: (7, 0)
Maze exit: (1, 30)

In [14]:
show_maze(make_maze((31,31), Maze.create_unicursal))


Maze entrance: (1, 0)
Maze exit: (1, 30)

In [15]:
show_maze(make_maze((31,31), Maze.create_spiral))


Maze entrance: (9, 0)
Maze exit: (3, 30)

In [16]:
show_maze(make_maze((31,31), Maze.create_braid_tilt))


Maze entrance: (15, 0)
Maze exit: (9, 30)

In [17]:
show_maze(make_maze((31,31), Maze.create_diagonal))


Maze entrance: (11, 0)
Maze exit: (17, 30)

In [18]:
show_maze(make_maze((31,31), Maze.create_sidewinder))


Maze entrance: (19, 0)
Maze exit: (19, 30)

In [19]:
show_maze(make_maze((31,31), Maze.create_recursive))


Maze entrance: (7, 0)
Maze exit: (7, 30)

In [20]:
show_maze(make_maze((31,31), Maze.create_prim))


Maze entrance: (27, 0)
Maze exit: (27, 30)