challenge

package
v0.0.0-...-265dad5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Dirs []Dir = []Dir{
	{"U", 0, -1},
	{"D", 0, 1},
	{"L", -1, 0},
	{"R", 1, 0},
}

Functions

func Run

func Run(key string)

func RunBreadthFirst

func RunBreadthFirst(key string)

func RunDepthFirst

func RunDepthFirst(key string)

Types

type Dir

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

func GetOpenDirs

func GetOpenDirs(path string) (rtn []*Dir)

type Maze

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

func (*Maze) BreadthFirstSearch

func (m *Maze) BreadthFirstSearch(
	paths []Path,
) *Path

func (*Maze) DepthFirstSearch

func (m *Maze) DepthFirstSearch(
	key string,
) []string

func (*Maze) Move

func (m *Maze) Move(x, y, xd, yd int) (xn, yn int)

type Path

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

Jump to

Keyboard shortcuts

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