Theseus port https://github.com/jamis/theseus version 1.0.2
Theseus is a library for generating and solving mazes. It also includes routines for rendering mazes (and their solutions) to both ASCII art, and to PNG image files.
There is also an included utility for generating mazes from the command-line.
Theseus supports the following types of mazes:
Mazes may be generated using any of the following features:
Theseus supports the following output types:
Theseus supports the following solution algorithms:
Orthogonal mazes may be converted to their unicursal equivalent. A unicursal maze is one which has only a single path that covers every cell in the field exactly once. This style is maze is often called a "labyrinth". See Theseus::OrthogonalMaze#to_unicursal for more information.
Theseus is also designed to allow you to step through both the generation of the maze, as well as the computation of the solution. This lets you (for instance) animate the construction (and solution) of the maze by drawing individual PNG frames for each step! And since Theseus includes an implementation of A* Search, this gives you an interesting way to visualize (among other things) how that algorithm works.
Lastly, Theseus can be used to manually build mazes (or any other grid-based structure) by hand. See Theseus::Maze for more information.
Theseus is designed to be super simple to use. See 'example' folder.
Theseus is created by Jamis Buck. It is made available in the public domain, completely unencumbered by rules, restrictions, or any other nonsense.
Please prefer good over evil.
Add this to your package's pubspec.yaml file:
dependencies: theseus: ^2.0.0
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
flutter pub get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Jul 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, web, other
No platform restriction found in primary library
Document public APIs. (-0.18 points)
172 out of 177 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
lib/src/maze.dart. (-2.96 points)
lib/src/maze.dart reported 6 hints, including:
line 46 col 3: Prefer using /// for doc comments.
line 123 col 104: Use
= to separate a named parameter from its default value.
line 537 col 7: This function has a return type of 'bool', but doesn't end with a return statement.
line 538 col 39: This function has a return type of 'bool', but doesn't end with a return statement.
line 933 col 46: This function has a return type of 'bool', but doesn't end with a return statement.
lib/src/formatters/ascii/orthogonal.dart. (-1.99 points)
lib/src/formatters/ascii/orthogonal.dart reported 4 hints:
line 6 col 3: Prefer using /// for doc comments.
line 12 col 3: Prefer using /// for doc comments.
line 18 col 3: Prefer using /// for doc comments.
line 159 col 75: This function has a return type of 'bool', but doesn't end with a return statement.
lib/src/formatters/png.dart. (-1 points)
lib/src/formatters/png.dart reported 2 hints:
line 54 col 18: Don't explicitly initialize variables to null.
line 122 col 36: Don't explicitly initialize variables to null.
Fix additional 23 files with analysis or formatting issues. (-3 points)
Additional issues in the following files:
Maintain an example.
None of the files in the package's
example/ directory matches known example patterns.
Common filename patterns include
theseus.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.