MiniGame-Madness
|
A struct that reprsents the nodes in the graph of the maze. More...
#include <maze.h>
Public Member Functions | |
MazeNode () | |
Default constructor for MazeNode. More... | |
void | addNeighbor (MazeNode *node, Direction direction) |
Add a neighboring nodes with a direction. More... | |
bool | removeNeighbor (Direction direction) |
Remove a neighboring node with a direction. More... | |
MazeNode * | getNeighbor (Direction direction) const |
Get the neighboring node in a given direction. More... | |
std::map< Direction, MazeNode * > | getNeighbors () const |
Get all neighboring nodes. More... | |
NodeType | getNodeType () const |
Get the piece type of the node. More... | |
bool | setNodeType (NodeType type) |
Set the piece type of the node. More... | |
Public Attributes | |
NodeType | type |
std::map< Direction, MazeNode * > | neighbors |
A struct that reprsents the nodes in the graph of the maze.
The default type is None reprasenting a node that hasn't been assigned a type yet.
|
inline |
Add a neighboring nodes with a direction.
node | - The node to add as a neighbor. |
direction | - The direction of the neighboring node. |
Get the neighboring node in a given direction.
direction | - The direction of the neighboring node. |
Get all neighboring nodes.
|
inline |
Get the piece type of the node.
|
inline |
Remove a neighboring node with a direction.
direction | - The direction of the neighboring node. |
|
inline |
Set the piece type of the node.
type | - The piece type to set. |
NodeType MazeNode::type |
The type of the node