mazeforge


Namemazeforge JSON
Version 0.2.0 PyPI version JSON
download
home_page
SummarySimple and fast generation of mazes
upload_time2024-01-29 20:38:09
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2024 Oskar Meyenburg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords labyrinth maze pymaze generation generate solve
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MazeForge

Generation of mazes in Python

## Installation

You can install **MazeForge** from [PyPI](https://pypi.org/project/mazeforge/) by running the following in your terminal.<br>
`python -m pip install mazeforge`
<br>

MazeForge is supported on Python 3.7 and above.

## Documentation

### class mazeforge.Maze(width, height)

This generates a perfect maze, which means that any two cells are connected by one single unique path. The maze is generated using the prim's algorithm.

```python
>>> import mazeforge
>>> mazeforge.Maze(width=5, height=5)
Maze(width=5, height=5)
```

#### print()

You can print the Maze using the print method.

```python
>>> import mazeforge
>>> mazeforge.Maze(5, 5).print()
┌───────┬───────────┐   
│       │           │   
├───╴   └───╴   ╷   │   
│               │   │   
│   ┌───────╴   ├───┤   
│   │           │   │   
├───┘   ╷   ╷   ╵   │   
│       │   │       │   
├───────┘   │   ╷   │   
│           │   │   │   
└───────────┴───┴───┘
```

For further use, you may also convert the maze into a string.

```python
>>> import mazeforge
>>> maze = mazeforge.Maze(5, 5)
>>> str(maze)
'┌───────┬───────────┐   \n│       │           │   \n├───╴   └───╴   ╷   │   \n│               │   │   \n│   ┌───────╴   ├───┤   \n│   │           │   │   \n├───┘   ╷   ╷   ╵   │   \n│       │   │       │   \n├───────┘   │   ╷   │   \n│           │   │   │   \n└───────────┴───┴───┘'
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "mazeforge",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Oskar Meyenburg <oskar.meyenburg@gmail.com>",
    "keywords": "labyrinth,maze,pymaze,generation,generate,solve",
    "author": "",
    "author_email": "Oskar Meyenburg <oskar.meyenburg@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/58/1f/01c3926396a73d20961ef3082d48b41efd2d12a6611baf38c5060ef28ff9/mazeforge-0.2.0.tar.gz",
    "platform": null,
    "description": "# MazeForge\n\nGeneration of mazes in Python\n\n## Installation\n\nYou can install **MazeForge** from [PyPI](https://pypi.org/project/mazeforge/) by running the following in your terminal.<br>\n`python -m pip install mazeforge`\n<br>\n\nMazeForge is supported on Python 3.7 and above.\n\n## Documentation\n\n### class mazeforge.Maze(width, height)\n\nThis generates a perfect maze, which means that any two cells are connected by one single unique path. The maze is generated using the prim's algorithm.\n\n```python\n>>> import mazeforge\n>>> mazeforge.Maze(width=5, height=5)\nMaze(width=5, height=5)\n```\n\n#### print()\n\nYou can print the Maze using the print method.\n\n```python\n>>> import mazeforge\n>>> mazeforge.Maze(5, 5).print()\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \n\u2502       \u2502           \u2502   \n\u251c\u2500\u2500\u2500\u2574   \u2514\u2500\u2500\u2500\u2574   \u2577   \u2502   \n\u2502               \u2502   \u2502   \n\u2502   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2574   \u251c\u2500\u2500\u2500\u2524   \n\u2502   \u2502           \u2502   \u2502   \n\u251c\u2500\u2500\u2500\u2518   \u2577   \u2577   \u2575   \u2502   \n\u2502       \u2502   \u2502       \u2502   \n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2502   \u2577   \u2502   \n\u2502           \u2502   \u2502   \u2502   \n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2518\n```\n\nFor further use, you may also convert the maze into a string.\n\n```python\n>>> import mazeforge\n>>> maze = mazeforge.Maze(5, 5)\n>>> str(maze)\n'\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \\n\u2502       \u2502           \u2502   \\n\u251c\u2500\u2500\u2500\u2574   \u2514\u2500\u2500\u2500\u2574   \u2577   \u2502   \\n\u2502               \u2502   \u2502   \\n\u2502   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2574   \u251c\u2500\u2500\u2500\u2524   \\n\u2502   \u2502           \u2502   \u2502   \\n\u251c\u2500\u2500\u2500\u2518   \u2577   \u2577   \u2575   \u2502   \\n\u2502       \u2502   \u2502       \u2502   \\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2502   \u2577   \u2502   \\n\u2502           \u2502   \u2502   \u2502   \\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2518'\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Oskar Meyenburg  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Simple and fast generation of mazes",
    "version": "0.2.0",
    "project_urls": {
        "documentation": "https://github.com/oskarmeyenburg/mazeforge/blob/main/README.md",
        "repository": "https://github.com/oskarmeyenburg/mazeforge"
    },
    "split_keywords": [
        "labyrinth",
        "maze",
        "pymaze",
        "generation",
        "generate",
        "solve"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f2b635ff66428e6cde3af47fb01eb176373c9dd6338cea6d8924aeb0f84d0f6",
                "md5": "0ca5338216844b8907a13737d514f0ea",
                "sha256": "ec6e18b242b36a6bf2a3231675f2dcaa358d83b50dd421f86100fbb7602f6db1"
            },
            "downloads": -1,
            "filename": "mazeforge-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0ca5338216844b8907a13737d514f0ea",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 247901,
            "upload_time": "2024-01-29T20:38:06",
            "upload_time_iso_8601": "2024-01-29T20:38:06.962654Z",
            "url": "https://files.pythonhosted.org/packages/4f/2b/635ff66428e6cde3af47fb01eb176373c9dd6338cea6d8924aeb0f84d0f6/mazeforge-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "581f01c3926396a73d20961ef3082d48b41efd2d12a6611baf38c5060ef28ff9",
                "md5": "7660cb29144e178104aef6c55665fa46",
                "sha256": "56443edfc1fccd7eed28b1104509d17bb80a83fe5d821e95a74c5fb176b5eaa1"
            },
            "downloads": -1,
            "filename": "mazeforge-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7660cb29144e178104aef6c55665fa46",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 244544,
            "upload_time": "2024-01-29T20:38:09",
            "upload_time_iso_8601": "2024-01-29T20:38:09.476085Z",
            "url": "https://files.pythonhosted.org/packages/58/1f/01c3926396a73d20961ef3082d48b41efd2d12a6611baf38c5060ef28ff9/mazeforge-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-29 20:38:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oskarmeyenburg",
    "github_project": "mazeforge",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mazeforge"
}
        
Elapsed time: 0.17431s