Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Goreland ¶
type Goreland struct {
}
func (Goreland) RenderPath ¶
RenderPath renders a path on top of a Goreland world.
type Pather ¶
type Pather interface {
// PathNeighbors returns the direct neighboring nodes of this node which
// can be pathed to.
PathNeighbors() []Pather
// PathNeighborCost calculates the exact movement cost to neighbor nodes.
PathNeighborCost(to Pather) float64
// PathEstimatedCost is a heuristic method for estimating movement costs
// between non-adjacent nodes.
PathEstimatedCost(to Pather) float64
}
Pather is an interface which allows A* searching on arbitrary objects which can represent a weighted graph.
type Truck ¶
type Truck struct {
// X and Y are the coordinates of the truck.
X, Y int
// contains filtered or unexported fields
}
A Truck is a Truck in a grid which implements Grapher.
func (*Truck) PathEstimatedCost ¶
PathEstimatedCost uses Manhattan distance to estimate orthogonal distance between non-adjacent nodes.
func (*Truck) PathNeighborCost ¶
PathNeighborCost returns the cost of the tube leading to Truck.
func (*Truck) PathNeighbors ¶
PathNeighbors returns the neighbors of the Truck
Click to show internal directories.
Click to hide internal directories.