a_star

package
v0.0.0-...-7ed7fe3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AStar

func AStar(startPosition game.Position, goalPosition game.Position, bodyPositionSet map[game.Position]bool, positionMatrix [][]game.Position) []main.node

Types

type PriorityNode

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

type PriorityQueue

type PriorityQueue []*PriorityNode

func (PriorityQueue) Exist

func (pq PriorityQueue) Exist(value game.position) (*PriorityNode, bool)

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() interface{}

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x interface{})

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

Jump to

Keyboard shortcuts

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