maze

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

maze

Maze implements Wilson's algorithm for generating mazes.

Sources

https://weblog.jamisbuck.org/2011/1/20/maze-generation-wilson-s-algorithm

Documentation

Overview

Package maze implements a maze generator using Wilson's algorithm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rectangle

type Rectangle struct {
	// contains filtered or unexported fields
}

func RectangleMaze

func RectangleMaze(height, width int, solve bool) (*Rectangle, error)

func SquareMaze

func SquareMaze(height int, solve bool) (*Rectangle, error)

func (*Rectangle) RenderPNG

func (r *Rectangle) RenderPNG(w io.Writer, scale int) error

func (*Rectangle) RenderSVG

func (r *Rectangle) RenderSVG(w io.Writer, scale int) error

func (*Rectangle) RenderText

func (r *Rectangle) RenderText(w io.Writer) error

func (*Rectangle) Solve

func (r *Rectangle) Solve()

Directories

Path Synopsis
cmd
maze command
Package main implements a command line application to generate mazes using Wilson's algorithm
Package main implements a command line application to generate mazes using Wilson's algorithm
solver command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址