Skip to main content

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

Results

img

Project details


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.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

mmaze-0.0.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file mmaze-0.0.1.tar.gz.

File metadata

  • Download URL: mmaze-0.0.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for mmaze-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9de7d727ce28b31766025dbaf01e05aa346fa31ed3e8b150caaad67553166222
MD5 b588e0ece999d8a7b299d307d605b69e
BLAKE2b-256 8727ba4857434cb918a66a8b366dbbbdeeacf6bfc2b45afb6f712089f9bef9f4

See more details on using hashes here.

File details

Details for the file mmaze-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mmaze-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for mmaze-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21ad8d50e4ad9269446d95d30c038b9614e4bafc2d1ea54487d4ea803c2244cc
MD5 a139d976f2cf498619105a109d52db3c
BLAKE2b-256 525e6c0072d51fbdaaec8cc86e9fcac6932184e6ecf0df7bfd0ce6071edca969

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page