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 (walls are True and passages are False), or as a container of lists of ints (walls are 1 and passages are 0):
>>> 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.ipynb to see visualisations of some of the kinds of Mazes Daedalus can create.
Requirements
Python 2.7, or 3.3+,
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.4-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fd6d2e076879278d558a85ae8b9ead82f3de9243e10d93ecf08e2704ea298cd |
|
MD5 | 7d1a58d45c34174f6db444f0953c4e7d |
|
BLAKE2b-256 | 28a2f814ce93ca29868600db3b4c9be52070e6e5f2afb3d98e2947a0a32b8ab1 |
Hashes for pydaedalus-0.1.4-cp34-cp34m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c0e8240d9c0e97808b36603a932d95c3c4e0b36c94c667855d5a24c480fa5e2 |
|
MD5 | 550607c3f3f13be72d3bf3219acdb953 |
|
BLAKE2b-256 | ed9ee59608ba2ef2a0bd21f68e89075afb90a4ab2f94a45104c12ecd74f079e4 |
Hashes for pydaedalus-0.1.4-cp27-none-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a76abd48b983eb217f1eeac4749364a5e2b29ae6baeb0fe8431aa69e999beec1 |
|
MD5 | aead0572e131faf93fdb466c95d401f6 |
|
BLAKE2b-256 | 0090adfc29c6f8a30663b6646abea31a2d802c5a571f4f823a42e2d6e088ddae |