Expand description

Labirust

This crate is a small and naive implementation of several Algorithms resolving Mazes.

  • It exposes the Algorithm trait encapsulating the behavior of such an algorithm.
  • It also provides structures to generate Maze (generate) and execute said algorithms on them (Executor).

Modules

Implementations

Structs

A structure holding a Maze and iteratively solving it with a provided Algorithm.

Data structure representing a maze on a grid. stores each possible paths as a HashMap mapping each positions to the accessible adjascent ones.

A discrete position on a 2D-grid.

Traits

Trait encapsulating the behavior of an algorithm solving mazes. Implementing this trait is done by providing a progress method which gets called iteratively on each steps of a Maze resolution.

Functions

Most common maze generation technique, recursively creating paths to unvisited cells, each time choosing next direction at random.