Releases: mjrlowe/maze_generator
Releases · mjrlowe/maze_generator
Version 0.4.0
New features
- Added growing tree algorithm. (#2/#17)
- New mazes are created with
new Maze()(rather thanMaze.create()). - The module is now Typescript-compatible.
- Added direction bias option (currently only works with some algorithms).
Behind-the-scenes changes
- Major refactoring. There is now an
Algorithmclass, as well as theMazeclass. - Transformation matrix now resets itself after displaying the maze.
v0.3.0
New Features and Bug Fixes
- Added seeds, which you you can use with the
seedproperty in the maze settings object. This can be a number or a string. Closes #3. - Added
prng, which you can set to a random number generator of your choice. - Added
.braid(), which removes all dead ends in a maze. Closes #13. - Fixed some mistakes in the documentation.
Behind-the-Scenes Changes
- Added some basic tests (using Deno). Closes #15.
- Changed the structure of the folders, including moving putting the main code into a
srcfolder (exceptmod.js). - DEV.md is no longer a public file (added to
.gitignore).
v0.2.1
v0.2.0
New features and bug fixes
- Added Wilson's algorithm. Closes #5.
- Replaced
strokeWeightwithlineThickness, which is a proportion of the cell size (so should be between 0 and 1). - Replaced
displayModewithasLine, which is a boolean value that affects whether the maze should be displayed as line (by default the walls are displayed instead) local-test.jsexample file is now justlocal.js- Fixed true Prim's algorithm not working
Behind-the-scenes changes
- Updated node-fetch version to 2.6.1 (from 2.6.0)
v0.1.2
Changes
distanceFrom: "solution"now works- There is now more flexibility with the name of the algorithm you use. For example, you can also now use
"depth-first search"for the recursive backtracker algorithm and you don't need the "s" at the end for algorithms like"ellers"and"kruskals". - Made the documentation a little clearer, and added missing sections on
displayModeanddistanceFrom.
v0.1.1
Changes
- Added missing documentation for new features added in 0.1.0
- Added
lineCapproperty to.display()settings. The defaultlineCapis now"square"(rather than"butt"). algorithmproperty in maze settings object no longer ignores digits. You can now usealgorithm: "10 print"to create a 10Print maze.algorithm: "prims"will now create a true Prim's maze (before it would default to recursive backtracker).- Fixed incorrect example code in REAME.md (
.error->.catch)
v0.1.0
New features and bug fixes
- Added true Prim's algorithm. Closes #6.
- Added the 10print algorithm. Use
algorithm: "ten print"to get it working. Maze.createWidget()now works (although lots of improvements still need to be made). You can play, pause, step and finish generation. Closes #11.- Added
distanceFromto.display(), so you can now specify where the distance is measured from incoloringMode: "distance". - maze_generator is now on nest.land. Importing from nest.land is now preferred over importing from deno.land/x.
- The
sizeproperty can now be used inMaze.create() - All algorithms should return a boolean after every call of
.step()now .display()now supportsremoveWallsAtEntranceAndExit(boolean), which does exactly what you would expect it to do."random"algorithm should always work now. (Bug fix).generate()no longerconsole.logs anything.- Added an image to the top of the README file, added information about importing the module and made a bunch of other improvements to
README.md. - Added
entranceandexitproperties for theMaze.create()parameter. These contain the location of the start and end points of the solution. - There's probably also a couple of small bug fixes that I forgot about.
Behind-the-scene changes
- Added
DEV.mdto remind myself what to do before each release. - Moved
DisjointSetclass into theKruskals.jsfile as it isn't used by any other algorithm - Code in the algorithms files now use
takeSteprather thanstep. - Some tidying of code.
Also the default branch is now "main" (rather than "master").
For more information about maze_generator, see this discussion on the nest.land repository.
v0.0.8
Changes
- fixed bug in v0.0.7 which stopped the whole module from working (
"maze" is not defined) - height/width of
0is no longer valid, the code now defaults to other value instead - fixed some examples being based off older versions so they weren't working properly
- added documentation for
strokeWeightproperty for.display(),strokeWeight0should work properly now - added
.getAnalysis()method (but I wouldn't recommend using it yet as it is very unstable and probably buggy) - fixed bug with
Maze.createWidgetnot working becauseMazewasn't defined entranceandexitandstartnow get converted to x-y object immediately- added information about
startto README (underMaze.createsection), all occurances ofstartGenerationFromhave been replaced withstart
v0.0.7
No new features this release.
Changes
- Replaced all occurrences of
this.startCellwiththis.startGenerationFromfor consistency - Fixed bug where the line was the same color as the background for display mode 2 on color mode
"normal" - Fixed bug where
floorshould have beenMath.floor - Minor changes to README file, improving clarity and correcting mistakes
.getXYPositioncan now take in just a direction (e.g."left"or"west") and it will assume it refers to the center of that side"random"algorithm should work (again) now: fixed bug where it didn't work because theTruePrimsalgorithm is incomplete.
v0.0.6
Changes
- Displaying the solution now works properly (but only from top left to bottom right at the moment): set the
showSolutionproperty totruewhen displaying the maze. You can customise the color withsolutionColor. - The maze class now has a new method:
.getSolution(), which returns the solution to the maze. It optionally takes in a start and end point (in that order). .calulateDistances()is now.getDistances()- Changed
getElementByTagtogetElementByTagNameindisplay()(bug fix) - Removed files needed for Github packages. (I have given up trying to get it to be able to be both a Github and npm package.)
- A couple of other very minor changes