cell

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

type Cell struct {
	Row, Column, Distance    int
	North, South, East, West *Cell
	Links                    map[*Cell]bool
}

Cell represents a individual cell in the Maze

func (*Cell) IsLinked

func (c *Cell) IsLinked(cell *Cell) bool

IsLinked checks if there's a linked between this cell and another cell

func (c *Cell) Link(cell *Cell, bidirectional bool)

Link creates a passage from the current instance to another cell

func (*Cell) Neighbors

func (c *Cell) Neighbors() []*Cell

Neighbors returns adjacent cells

func (*Cell) String

func (c *Cell) String() string
func (c *Cell) Unlink(cell *Cell, bidirectional bool)

Unlink removes a passage from the current instance to another cell

Jump to

Keyboard shortcuts

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