grid

package
v0.0.0-...-1fe7fef Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grid

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

Grid represents a Maze Data model

func New

func New(rows, columns int) *Grid

New creates a new Grid

func (*Grid) Cells

func (g *Grid) Cells() [][]cell.Cell

Cells returns the cells

func (*Grid) SaveAsPNG

func (g *Grid) SaveAsPNG(cellSize, maxDistance int)

SaveAsPNG persists the maze as PNG

func (*Grid) Size

func (g *Grid) Size() int

Size returns the number of cells

func (*Grid) String

func (g *Grid) String() string

Jump to

Keyboard shortcuts

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