heightmap

package
v0.0.0-...-9c9a4a3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	START = 'S'
	END   = 'E'
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HeightMap

type HeightMap struct {
	Start Position
	End   Position
	// contains filtered or unexported fields
}

func (HeightMap) ShortestPath

func (hm HeightMap) ShortestPath(start, dest Position) int

func (HeightMap) ShortestPathFromHeight

func (hm HeightMap) ShortestPathFromHeight(startHeight byte, dest Position) int

type Node

type Node struct {
	Pos  Position
	Dist int
}

func (Node) Next

func (n Node) Next(dp Position) Position

type Parser

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

func NewParser

func NewParser(s Scanner) Parser

func (Parser) Parse

func (p Parser) Parse() HeightMap

type Position

type Position struct {
	X int
	Y int
}

type Scanner

type Scanner interface {
	Scan() bool
	Text() string
}

Jump to

Keyboard shortcuts

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