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, haxagonal, 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.1.tar.gz (39.7 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.1-py3-none-any.whl (60.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: the_maze_py-0.2.1.tar.gz
  • Upload date:
  • Size: 39.7 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.1.tar.gz
Algorithm Hash digest
SHA256 b869856d14e4294deec4dcd5d5738563ce27b8c5e3f7a202909b4d491e36954e
MD5 0d4f3f10b12779fb6173cb51447efdb1
BLAKE2b-256 a370f8992c9800408f7d3c6a91046909d526bb2059c4971f8ff07bb24759e6bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: the_maze_py-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 60.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 110e22f1823e7014b1a2d5ab4b166fdb6bccdeb1c2016ce87a4d40a5fcc29ceb
MD5 55b218d06a7ce91e61b27adc09e49839
BLAKE2b-256 5fef8bb578e11c4e586644a8c2b2708cc7465d77c2b1fe43c4ea72bd4a884832

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