Skip to main content

A package that generates mazes

Project description

mazepy

A maze library based off of the book Mazes for Programmers by Jamis Buck but with more stuff.

Installation

pip install the-maze-py

Maze Shapes Supported

2D

  • Rectangular
  • Polar (Circular)
  • Hexagonal
  • Triangular
  • Arbitrary shapes with masking

3D

  • Layers (Grid 3D)
  • Cylindrical
  • Spherical
  • Cube
  • Toroidal
  • Möbius Strip

Generation Algorithms Supported

  • Aldous Broder
  • Binary Tree (not triangular)
  • Ellers (not triangular)
  • Fractal Tesselation (only rectangualar)
  • Growing Tree
  • Hunt and Kill
  • Kruskals (not polar, hexagonal, or triangular)
  • Origin Shift
  • Prims (Simplified, True, Modified)
  • Recursive Backtrack (DFS)
  • Recursive Division (only Rectangular)
  • Sidewinder
  • Wilsons

Other Features

  • Printing rectangular mazes
  • Generating pngs of mazes
  • Color grids based on distance
  • Viewing 3d grids in 3d
  • Animations of maze creation and filling with color gradient

Examples

Showing a colored maze

import mazepy as mp

grid = mp.grids.ColoredGrid(10,10, base='red', end='blue')
mp.algorithms.Ellers(grid)
grid.distances = grid[5, 5].distances()   # Set starting cell (this is required)
grid.show()

Mazes of different shapes

import mazepy as mp

grid = mp.grids.PolarGrid(10)
mp.algorithms.RecursiveBacktrack(grid)
grid.show()

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

the_maze_py-0.2.5.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

the_maze_py-0.2.5-py3-none-any.whl (61.0 kB view details)

Uploaded Python 3

File details

Details for the file the_maze_py-0.2.5.tar.gz.

File metadata

  • Download URL: the_maze_py-0.2.5.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for the_maze_py-0.2.5.tar.gz
Algorithm Hash digest
SHA256 665881ea51b09049566203ed165b7557ab9dbda937f50c3a76ac56232e707dd8
MD5 3a6aaf085fb8ebd1a6dc78432e88ee90
BLAKE2b-256 799ff8245a5d86a4c0c7e55afe2b30646a08c2b5671720b350b1e63edaab17d4

See more details on using hashes here.

File details

Details for the file the_maze_py-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: the_maze_py-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 61.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for the_maze_py-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 56e2acb3e8ff9faf6ff772e125d1ba1a4ddd6616421b3149e6d26657ca64f199
MD5 4641678576bbd1d612d99c1885e56699
BLAKE2b-256 0f2e6842e41d4f1ac1a3cb44dedc488f5c3fb43d53add3b7dd880d3f2ebd562b

See more details on using hashes here.

Supported by

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