Skip to content

PerryRylance/Prims

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prims

Prims algorithm and maze generator

Installation

composer require perry-rylance/prims

Usage

First construct a Maze, specifying width, height and seed (optional).

$maze = new Maze(15, 15, 123);

Now call

$maze->generate();

Now you can access the multidimensional array of cells via

$maze->cells;

Recommendations

  • Odd dimensions work best (otherwise you may have a 2-cell border on one or more sides)
  • Please note the generated maze does not have outer walls

About

Prims algorithm and maze generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages