walker

package
v0.0.0-...-78c63d2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 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 Guard

type Guard struct {
	PositionX              int
	PositionY              int
	Direction              WalkingDirection
	Steps                  int
	WalksInLoop            bool
	VisitedLoationsWithDir map[string]struct{}
	UniqueVisitedLocations map[string]struct{}
}

func NewGuard

func NewGuard(grid [][]string) *Guard

func (*Guard) Move

func (g *Guard) Move(grid [][]string) bool

type WalkingDirection

type WalkingDirection int
const (
	Up WalkingDirection = iota
	Right
	Down
	Left
)

Jump to

Keyboard shortcuts

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