Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coordinate ¶
func NewCoord ¶
func NewCoord(x int, y int) *Coordinate
func (*Coordinate) String ¶
func (c *Coordinate) String() string
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func (*Map) GetNeighbours ¶
func (m *Map) GetNeighbours(coord *Coordinate) []*Coordinate
func (*Map) IsFree ¶
func (m *Map) IsFree(coord *Coordinate) bool
type Obstacle ¶
type Obstacle struct { From Coordinate To Coordinate }
type Path ¶
type Path []*Coordinate
func AStar ¶
func AStar(m *Map, from *Coordinate, to *Coordinate) Path
func BreadthFirst ¶
func BreadthFirst(m *Map, from *Coordinate, to *Coordinate) Path
func Djikstra ¶
func Djikstra(m *Map, from *Coordinate, to *Coordinate) Path
func GreedyBreadthFirst ¶
func GreedyBreadthFirst(m *Map, from *Coordinate, to *Coordinate) Path
type PathFinder ¶
type PathFinder func(*Map, *Coordinate, *Coordinate) Path
Click to show internal directories.
Click to hide internal directories.