Skip to content

Repository files navigation

Maze Generation

A Swift program that uses Recursive-Backtracking to generate a maze

Based off of:

Console Screenshot Game Screenshot

Used in the Relic Race App:

Avaialble on the iOS App Store here

Notes

  • Odd-numbered width and height for best-results
  • Data is represented in a 2-D Array (columns x rows)
  • Each Entry represents one tile and is classified as a wall or floor
  • A graph is also generated with each vertex representing a tile
  • The edges in the graph represent passages and are uniform in weight

Use

//Width - Number of Columns
//Height - Number of Rows
let maze = Maze(width: 11, height: 11)

//Retrieve graph
let graph = maze.graph

//Output maze to console
maze.outputMaze()

Clone Repository

git clone https://github.com/patrickbiel01/Maze-Generation.git

Issues

If you have any bugs or feature requests, please submit an issue.

Contribution

If you wish to contribute, fork my project and create a pull request

License

Maze Generation is released under the MIT license. See LICENSE for details.

About

A Swift program that uses Recursive-Backtracking to generate a maze

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages