Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintGraphNode ¶
String implementation to print node
Types ¶
type Graph ¶
Graph with nodes and paths
func DispatchToGraph ¶
DispatchToGraph assemble graph to provide it to player
type Map ¶
type Map struct { // Container of rows and columns Container [][]byte // Size of rows and columns Size, Height, Width int // Walls props Walls Walls // Key, Entrance, Exit locations Key, Entrance, Exit Point // KeyCode is unique string for key and exit KeyCode string }
mazeMap by rows
type Node ¶
type Node struct { // Visited if node was traversed Visited bool `json:"-"` // Entity represent an value Entity byte `json:"entity,omitempty"` // Point holds location Point Point `json:"point"` // IsLeftNeighbor exist IsLeftNeighbor bool `json:"is_left_neighbor"` // IsRightNeighbor exist IsRightNeighbor bool `json:"is_right_neighbor"` // IsTopNeighbor exist IsTopNeighbor bool `json:"is_top_neighbor"` // IsBottomNeighbor exist IsBottomNeighbor bool `json:"is_bottom_neighbor"` // LeftNeighbor edged nodes LeftNeighbor *Node `json:"-"` // RightNeighbor edged nodes RightNeighbor *Node `json:"-"` // TopNeighbor edged nodes TopNeighbor *Node `json:"-"` // BottomNeighbor edged nodes BottomNeighbor *Node `json:"-"` }
Node represent single cell
Click to show internal directories.
Click to hide internal directories.