Python wrapper of Daedalus monochrome maze
Project description
Daedalus source code is copyright (c) 1998-2016 Walter D. Pullen.
Wrapper is copyright (c) 2016 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
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
pydaedalus-0.1.1.tar.gz
(370.6 kB
view hashes)
Built Distributions
Close
Hashes for pydaedalus-0.1.1-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3742325c491ecda87ffd5f8aafc2f3e32ff4ed7ff0d22138e33eb618481c9ec6 |
|
MD5 | c92ff4582cefc0665267910fe7991800 |
|
BLAKE2b-256 | b42bb9ee8dab12690bd28780cbd134cb8eaa857ef233a49aa7f9b359c836ff1b |
Close
Hashes for pydaedalus-0.1.1-cp34-cp34m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd79bc9d19b343eb9c45fabcb7a6f44354eeb00c2e1ed7a2ff0e9775f6367333 |
|
MD5 | 7a295826d17c0d709551ebd78e359c65 |
|
BLAKE2b-256 | 05093f0cd5392779763fdfc128a577ef55b69b817832b5900f231d661865cbde |
Close
Hashes for pydaedalus-0.1.1-cp27-none-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3af7e24434c8c0d3f200ee1341da5a58ffb3391e56dd363f6476e923750350d2 |
|
MD5 | afbb7d3ee4c5cd86fc6c6a5f9db17963 |
|
BLAKE2b-256 | 248468f4fd5aa634b297d604dfebd697b512a59f18e3b29c56d57e6ab94eb34e |