finder

package
v0.0.0-...-cc1f7f6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 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 AStarFinder

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

AStarFinder A* algorighm

func NewAStarFinder

func NewAStarFinder() *AStarFinder

NewAStarFinder create A* finder

func (*AStarFinder) Find

func (asf *AStarFinder) Find(fromX, fromY, toX, toY int32) []*Point

Find calculate road from start grid to end grid

func (*AStarFinder) SetWalkableChecker

func (asf *AStarFinder) SetWalkableChecker(f func(x, y int32) bool)

SetWalkableChecker grid walkable callback

type Point

type Point struct {
	X int32
	Y int32
}

Point grid descriptor

Jump to

Keyboard shortcuts

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