Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct {
// contains filtered or unexported fields
}
Cell a point in a maze
type CellNeighbor ¶
type CellNeighbor struct {
// contains filtered or unexported fields
}
CellNeighbor neighboring cell in a maze
func (CellNeighbor) String ¶
func (n CellNeighbor) String() string
type Drawing ¶
Drawing draws a maze
func CreateDrawing ¶
CreateDrawing create a drawing given dimensions and a cell size
type Edge ¶
type Edge struct {
// contains filtered or unexported fields
}
Edge represents the edge between two cells in the maze
type Maze ¶
type Maze struct {
// contains filtered or unexported fields
}
Maze is a 2d grid of cells with possible walls between each cell
func Create ¶
func Create(width int, height int, solverType SolverType) Maze
Create creates a maze of dimension {width, height}
type Neighbors ¶
type Neighbors struct {
// contains filtered or unexported fields
}
Neighbors holds the neighboring cells of a cell
type Solver ¶
type Solver struct {
// contains filtered or unexported fields
}
Solver builds a maze using various rules
func CreateSolver ¶
func CreateSolver(solverType SolverType, cells []*Cell) Solver
CreateSolver Creates a solver struct
func (*Solver) GenerateMaze ¶
func (s *Solver) GenerateMaze()
GenerateMaze Creates a maze using a solver type
type SolverType ¶
type SolverType int
SolverType types of solvers for mazes
const ( GrowingTreeNewest SolverType = iota + 1 GrowingTreeRandom GrowingTree50Split )
SolverType types of solvers for mazes
func (SolverType) String ¶
func (i SolverType) String() string
Click to show internal directories.
Click to hide internal directories.