Documentation ¶
Index ¶
Constants ¶
View Source
const ( Available = '0' // Available Block = 'X' // Block Start = 'S' // Start End = 'E' // End Dot = '.' // Path )
View Source
const ( DefaultCost = 10 DiagonalCost = 14 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coordinate ¶
func (*Coordinate) String ¶
func (c *Coordinate) String() string
type MapInfo ¶
type MapInfo struct { Tag string Start *Node End *Node Width int Height int Map map[int]map[int]*Node OpenSet *NodeSet ClosedSet *NodeSet }
func MakeDefaultMap ¶
func MakeDefaultMap(tag string, width, height int, start, end Coordinate, block []Coordinate) (*MapInfo, error)
func (*MapInfo) GetNearNodes ¶
type Node ¶
type Node struct { Coord Coordinate Display rune G int H int Parent *Node }
func (*Node) CalcGValue ¶
func (*Node) CalcHValue ¶
type NodeSet ¶
func MakeNodeSet ¶
func (*NodeSet) IsInSet ¶
func (ns *NodeSet) IsInSet(coord *Coordinate) bool
Click to show internal directories.
Click to hide internal directories.