astar

package
v0.0.0-...-59843aa Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Astar

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

寻路

func NewAstar

func NewAstar(w, h int) (astar Astar)

新建

func NewAstarFromData

func NewAstarFromData(w, h int, data []byte) (astar Astar, err error)

新建

func (*Astar) CheckPoint

func (a *Astar) CheckPoint(x, y int) bool

校验点

func (*Astar) Find

func (a *Astar) Find(x1, y1, x2, y2 int) (err error)

寻找路线

func (*Astar) GetPath

func (a *Astar) GetPath() []g2d.Point

获取路径

func (*Astar) SetData

func (a *Astar) SetData(x, y int, val uint8) (err error)

设置数据

Jump to

Keyboard shortcuts

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