My Project
UML Lab
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Friends | List of all members
MoveNode Class Reference

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< MoveNodegetChildren () 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< MoveNodechildren
 

Friends

class Board
 

Detailed Description

Class representing a node in the MinMax tree.

Constructor & Destructor Documentation

◆ MoveNode()

MoveNode::MoveNode ( const Move & move,
int score )

Constructor for MoveNode class.

Parameters
moveThe move associated with this node.
scoreThe score of this node.

Member Function Documentation

◆ addChild()

void MoveNode::addChild ( const MoveNode & child)

Add a child to this node.

Parameters
childThe child node to be added.

◆ getChildren()

std::vector< MoveNode > MoveNode::getChildren ( ) const

Get the children of this node.

Returns
A vector of MoveNode representing the children.

◆ getMove()

Move MoveNode::getMove ( ) const

Get the move associated with this node.

Returns
The move associated with this node.

◆ getScore()

int MoveNode::getScore ( ) const

Get the score of this node.

Returns
The score of this node.

Friends And Related Symbol Documentation

◆ Board

friend class Board
friend

Member Data Documentation

◆ children

std::vector<MoveNode> MoveNode::children
private

The children of this node.

◆ move

Move MoveNode::move
private

The move associated with this node.

◆ score

int MoveNode::score
private

The score of this node.


The documentation for this class was generated from the following files: