Package maze provides generating, solving, and other utilities for working with mazes.
- func Gray(m *Maze) *image.Gray
- type Finder
- type FinderFn
- type Generator
- type Maze
This section is empty.
Dijkstra is a path finder implementing Dijkstra's algorithm.
Finder is anything that can find a path between two cells in a maze
FinderFn is a function which implements the Finder interface.
Generator represents anything that can generate a maze.
func WithKruskal ¶
WithKruskal2 returns a generator which uses Kruskal's algorithm to generate mazes.
Maze 2D rectangular maze.
FromGray extracts a maze from a grayscale image.
Generate is a no configuration necessary maze generating function.
Connected returns whether or not two cells in the maze are directly connected.
Dims returns the width and height of the maze.
func (*Maze) MarshalDOT ¶
MarshalDOT marshals the maze as a graph into the DOT language.
func (*Maze) MarshalText ¶
MarshalText marshals the maze into a textual form.
Neighbors returns all the direct neighbors of a cell.