Python wrapper of Daedalus monochrome maze
Project description
Daedalus source code is copyright (c) 1998-2016 Walter D. Pullen.
Wrapper is copyright (c) 2017 Will Roberts <wildwilhelm@gmail.com>.
Licensed under the GNU General Public License version 2.
A Python wrapper of the Daedalus maze generator. This project is currently built against version 3.2 of the Daedalus software.
Quickstart
Install:
pip install pydaedalus
Getting started:
>>> from daedalus import Maze >>> maze = Maze(63, 63) >>> maze.create_perfect() >>> maze.resize(31, 61) >>> maze.create_perfect() >>> maze.save_bitmap('test.bmp') >>> maze.save_text('test.txt')
A Maze can be treated as a 2D array of Bools, or as a container of lists of ints:
>>> maze.width, maze.height (31, 61) >>> maze[0,0] True >>> maze[1,1] False >>> maze[1,2] False >>> maze[1,3] False >>> maze[1] [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1] >>> len(maze) 61
Take a look at demo.ibpynb to see visualisations of some of the kinds of Mazes Daedalus can create.
Requirements
Python 2.7, 3.3, 3.4, 3.5, or 3.6.
A C++ compiler with C++11 support (GCC 4.7+, clang 3.3+).
Development Notes
To compile the Cython extension:
python setup.py build_ext --inplace
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
Built Distributions
Hashes for pydaedalus-0.1.3-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8171c58a1b14725c10c5c8b97a4d31a124d61dfe6d8d0516bd986e9d719642d1 |
|
MD5 | cd06e88fd202cd3960ed65bf13ed9d37 |
|
BLAKE2b-256 | 9aabed171dd08e0343b4dec2768976003fe3a17590268d002895ff176dfd9d5f |
Hashes for pydaedalus-0.1.3-cp34-cp34m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17cdcd56aba7ee03fd645838c22e254af296949161ddc1b2871a4f2b9c088e67 |
|
MD5 | a1705e6b2750e61e5eb43974ce737ac1 |
|
BLAKE2b-256 | 0a8f3da49dd1d2374c34c2d27f82e6ea32181c3e32ae11dd08718c629aedde62 |
Hashes for pydaedalus-0.1.3-cp27-none-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9142dedd86e04dc46fadcb4ef3aa7f10815a4b601b9d37789c96614e45019a3 |
|
MD5 | 9c630722fa63759a353cbfc381a0f920 |
|
BLAKE2b-256 | 5a13a1e81f2dbb1114a41f8d49b8b48ae3b9d3bc8e59655d15166ad1c6d57ec4 |