My Project
UML Lab
Loading...
Searching...
No Matches
movenode.h
Go to the documentation of this file.
1
2#ifndef MAINPROJECT_MOVENODE_H
3#define MAINPROJECT_MOVENODE_H
4#include <vector>
5#include "move.h"
6
10class MoveNode {
11public:
17 MoveNode(const Move& move, int score);
18
23 Move getMove() const;
24
29 int getScore() const;
30
35 std::vector<MoveNode> getChildren() const;
36
41 void addChild(const MoveNode& child);
42
43private:
44 friend class Board;
46 int score;
47 std::vector<MoveNode> children;
48};
49#endif //MAINPROJECT_MOVENODE_H
Represents the game board and its functionality.
Definition board.h:21
Class representing a move in the game.
Definition move.h:7
Class representing a node in the MinMax tree.
Definition movenode.h:10
int score
Definition movenode.h:46
void addChild(const MoveNode &child)
Add a child to this node.
Definition movenode.cpp:37
Move getMove() const
Get the move associated with this node.
Definition movenode.cpp:13
Move move
Definition movenode.h:45
std::vector< MoveNode > getChildren() const
Get the children of this node.
Definition movenode.cpp:29
MoveNode(const Move &move, int score)
Constructor for MoveNode class.
Definition movenode.cpp:7
int getScore() const
Get the score of this node.
Definition movenode.cpp:21
std::vector< MoveNode > children
Definition movenode.h:47