My Project
UML Lab
|
Class representing a node in the MinMax tree. More...
#include <movenode.h>
Public Member Functions | |
MoveNode (const Move &move, int score) | |
Constructor for MoveNode class. | |
Move | getMove () const |
Get the move associated with this node. | |
int | getScore () const |
Get the score of this node. | |
std::vector< MoveNode > | getChildren () const |
Get the children of this node. | |
void | addChild (const MoveNode &child) |
Add a child to this node. | |
Private Attributes | |
Move | move |
int | score |
std::vector< MoveNode > | children |
Friends | |
class | Board |
Class representing a node in the MinMax tree.
MoveNode::MoveNode | ( | const Move & | move, |
int | score ) |
Constructor for MoveNode class.
move | The move associated with this node. |
score | The score of this node. |
void MoveNode::addChild | ( | const MoveNode & | child | ) |
Add a child to this node.
child | The child node to be added. |
std::vector< MoveNode > MoveNode::getChildren | ( | ) | const |
Get the children of this node.
Move MoveNode::getMove | ( | ) | const |
Get the move associated with this node.
int MoveNode::getScore | ( | ) | const |
Get the score of this node.
|
friend |
|
private |
The children of this node.
|
private |
The move associated with this node.
|
private |
The score of this node.