Documentation
¶
Index ¶
- type ActorType
- type Coordinate
- type Graph
- func (g *Graph) AddEdge(edge GraphEdge)
- func (g *Graph) AddNode(node GraphNode)
- func (g *Graph) FindNodesByLocation(coordinate Coordinate, nodeType any) *GraphNode
- func (g *Graph) GetConnectedNodes(nodeID uint, nodeType any) []*GraphNode
- func (g *Graph) GetNodeByID(nodeID uint) *GraphNode
- func (g *Graph) GetNodesByType(nodeType any) []*GraphNode
- type GraphEdge
- type GraphNode
- type Operation
- type Statistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coordinate ¶
type Coordinate struct {
// X, Y axis
X, Y int
}
Coordinate where something is possessed
type Graph ¶
Graph model
func (*Graph) FindNodesByLocation ¶
func (g *Graph) FindNodesByLocation(coordinate Coordinate, nodeType any) *GraphNode
FindNodesByLocation node in given coordinate
func (*Graph) GetConnectedNodes ¶
GetConnectedNodes returns a slice of connected nodes of the given type to the node with the specified ID
func (*Graph) GetNodeByID ¶
GetNodeByID returns the node with the specified ID, or nil if it is not found
func (*Graph) GetNodesByType ¶
GetNodesByType returns a slice of nodes with the specified type
type Statistics ¶
Statistics about world operations
Click to show internal directories.
Click to hide internal directories.