Skip to content

Small tool that generates mazes from different sizes, starting at 5x5 grid to 30x30 grid, using different algorithms. Coded in Python ๐Ÿ.

Notifications You must be signed in to change notification settings

GustavoRuedaEnriquez/maze-generator

Repository files navigation

Maze Generator

Small tool that generates mazes from different sizes, starting at 5x5 grid to 30x30 grid, using different algorithms. Coded in Python ๐Ÿ.

Currently, the tool only supports 4 algorithms (hoping to implement more!) :

Big shout out to Jamis Buck, your articles in The Buckblog really helped me to achieve this. Thanks a lot!

Installing the project

Before installing the project, make sure you have Python 3.8.6 or later installed on your computer. After this, it is required to download the repository and to install pygame, this library is required in order to make the project work.

> git clone https://github.com/GustavoRuedaEnriquez/maze-generator.git
> cd maze-generator
> pip install pygame

Usage

The usage is really simple, on the project's directory run the command following this template:

> python maze-generator.py <width> <height> <algorithm>

Where:

  • width - A number representing the total width in cells. Valid values are [5, 30].
  • height - A number representing the total height in cells. Valid values are [5, 30].
  • algorithm - A string representing the desired algorithm to use. Valid values [dfs, prim, kruskal].

i.e.1. Generate a 15x21 maze using depth first search algorithm

> python maze-generator.py 15 21 dfs

i.e.2. Generate a 30x30 maze using prim's algorithm

> python maze-generator.py 30 30 prim
Demo

About

Small tool that generates mazes from different sizes, starting at 5x5 grid to 30x30 grid, using different algorithms. Coded in Python ๐Ÿ.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages