wire

package
v0.0.0-...-0235693 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsInt

func AbsInt(n int) int

Types

type Path

type Path struct {
	Steps  []Step
	Lookup map[Point]int
}

func ParsePath

func ParsePath(sp string) (*Path, error)

func (*Path) BestIntersection

func (p *Path) BestIntersection(op *Path) int

func (*Path) BuildLookup

func (p *Path) BuildLookup() error

func (*Path) Intersections

func (p *Path) Intersections(op *Path) []Point

func (*Path) String

func (p *Path) String() string

type Point

type Point struct {
	X, Y int
}

func (Point) ManhattanDist

func (pt Point) ManhattanDist() int

type Step

type Step struct {
	Dir   rune
	Count int
}

func ParseStep

func ParseStep(s string) (Step, error)

func (Step) String

func (s Step) String() string

Jump to

Keyboard shortcuts

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