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.2-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0015fbcfd3ff127cbf982fece40fbd96a6986b6597c21e0cb0887ad9cf4be44 |
|
MD5 | 3077bdb5aa545d79b91832dc3593a076 |
|
BLAKE2b-256 | 31bb16107f9dfac18e5be9d4dc2d1ea658cdc6dd5cd68506370096e2f56d6976 |
Hashes for pydaedalus-0.1.2-cp34-cp34m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6ae58e5a87c6d42a2e2877d99ebdd38896110281c0fff33c3f5e8761a11dac0 |
|
MD5 | 9f01f43f9d56e828481628473befb655 |
|
BLAKE2b-256 | 2d93a66b5cd477163edb718221061312ab9fea5759cb01ba84b19938dd3a3f30 |
Hashes for pydaedalus-0.1.2-cp27-none-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb50cfacd1b6a1db879f74de86ba3d9d9e47d528f6a7dffe62dea8164c8b2805 |
|
MD5 | 124934fb5ca46c0b74c8f25964d68f01 |
|
BLAKE2b-256 | cb6aabd9a1da4c67c2934c01a4c95928194124c0a2c5b3c41f24fba3e8a41486 |