Skip to content

Releases: mjrlowe/maze_generator

Version 0.4.0

04 Dec 19:25
Compare
Choose a tag to compare

New features

  • Added growing tree algorithm. (#2/#17)
  • New mazes are created with new Maze() (rather than Maze.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 Algorithm class, as well as the Maze class.
  • Transformation matrix now resets itself after displaying the maze.

v0.3.0

13 Oct 18:52
Compare
Choose a tag to compare

New Features and Bug Fixes

  • Added seeds, which you you can use with the seed property 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 src folder (except mod.js).
  • DEV.md is no longer a public file (added to .gitignore).

v0.2.1

21 Sep 07:48
Compare
Choose a tag to compare

Changes

  • Fixed missing recursive division and random algorithms
  • Fixed LICENSE spelling
  • Fixed nest.land module being unlisted

v0.2.0

13 Sep 16:33
Compare
Choose a tag to compare

New features and bug fixes

  • Added Wilson's algorithm. Closes #5.
  • Replaced strokeWeight with lineThickness, which is a proportion of the cell size (so should be between 0 and 1).
  • Replaced displayMode with asLine, which is a boolean value that affects whether the maze should be displayed as line (by default the walls are displayed instead)
  • local-test.js example file is now just local.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

09 Aug 11:32
Compare
Choose a tag to compare

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 displayMode and distanceFrom.

v0.1.1

25 Jul 18:38
Compare
Choose a tag to compare

Changes

  • Added missing documentation for new features added in 0.1.0
  • Added lineCap property to .display() settings. The default lineCap is now "square" (rather than "butt").
  • algorithm property in maze settings object no longer ignores digits. You can now use algorithm: "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

22 Jul 16:08
Compare
Choose a tag to compare

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 distanceFrom to .display(), so you can now specify where the distance is measured from in coloringMode: "distance".
  • maze_generator is now on nest.land. Importing from nest.land is now preferred over importing from deno.land/x.
  • The size property can now be used in Maze.create()
  • All algorithms should return a boolean after every call of .step() now
  • .display() now supports removeWallsAtEntranceAndExit (boolean), which does exactly what you would expect it to do.
  • "random" algorithm should always work now. (Bug fix)
  • .generate() no longer console.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 entrance and exit properties for the Maze.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.md to remind myself what to do before each release.
  • Moved DisjointSet class into the Kruskals.js file as it isn't used by any other algorithm
  • Code in the algorithms files now use takeStep rather than step.
  • 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

24 Jun 17:08
Compare
Choose a tag to compare

Changes

  • fixed bug in v0.0.7 which stopped the whole module from working ("maze" is not defined)
  • height/width of 0 is 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 strokeWeight property for .display(), strokeWeight 0 should 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.createWidget not working because Maze wasn't defined
  • entrance and exit and start now get converted to x-y object immediately
  • added information about start to README (under Maze.create section), all occurances of startGenerationFrom have been replaced with start

v0.0.7

22 Jun 12:06
Compare
Choose a tag to compare

No new features this release.

Changes

  • Replaced all occurrences of this.startCell with this.startGenerationFrom for consistency
  • Fixed bug where the line was the same color as the background for display mode 2 on color mode "normal"
  • Fixed bug where floor should have been Math.floor
  • Minor changes to README file, improving clarity and correcting mistakes
  • .getXYPosition can 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 the TruePrims algorithm is incomplete.

v0.0.6

20 Jun 19:38
Compare
Choose a tag to compare

Changes

  • Displaying the solution now works properly (but only from top left to bottom right at the moment): set the showSolution property to true when displaying the maze. You can customise the color with solutionColor.
  • 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 getElementByTag to getElementByTagName in display() (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