https://github.com/jamis/mazemaker
An implementation of grid layouts and maze algorithms, in Swift
https://github.com/jamis/mazemaker
Last synced: 7 months ago
JSON representation
An implementation of grid layouts and maze algorithms, in Swift
- Host: GitHub
- URL: https://github.com/jamis/mazemaker
- Owner: jamis
- License: mit
- Created: 2016-01-23T19:59:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-01-28T20:48:36.000Z (over 7 years ago)
- Last Synced: 2025-04-18T04:55:48.344Z (about 1 year ago)
- Language: Swift
- Size: 61.5 KB
- Stars: 23
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MazeMaker
This is a collection of utilities, written in Swift, for instantiating,
manipulating, and rendering grids. It is specifically designed for representing
and creating mazes--randomly generated spanning trees on these grids.
## Usage
First, instantiate a layout, and a grid that uses that layout:
```swift
import MazeMaker
let layout = OrthogonalLayout(rows: 10, columns: 10)
let grid = Grid(layout: layout)
```
Then, apply an algorithm to the grid:
```swift
let algo = AldousBroder()
algo.applyTo(grid)
```
Finally, display it:
```swift
print(grid.toString())
```
## Caveats
As this is my first Swift project, I'm sure I'm doing all kinds of things
in all kinds of questionable ways. I would love feedback directing me towards
better ways of representing this in Swift, including (but not limited to)
more idiomatic code, more efficient techniques, and how to make better use of
what Swift provides.
## Author
Jamis Buck