Generating and solving maze
Project description
MMaze
A simple python maze generator and solver.
Simple usage
Generating a maze with specific width and height. Print on screen directly.
import mmaze
m = mmaze.generate(width=3, height=3)
print(m)
"""
#######
# # #
# ### #
# #
# #####
# #
#######
"""
Plot the maze to image.
m = mmaze.generate(width=3, height=3)
m.plot()
Get solution and plot on screen:
m = mmaze.generate(width=10, height=10)
solutions = m.sovle(start=(0, 0), end=(9, 9))
m.plot(solution=solutions[0])
Demo
Demo can be found in test file: tests
Install
pip install mmaze
Download or fork
Download link
Fork this repo:
$ git clone https://github.com/MorvanZhou/mmaze.git
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mmaze-0.0.2.tar.gz
(15.2 kB
view hashes)
Built Distribution
mmaze-0.0.2-py3-none-any.whl
(20.7 kB
view hashes)