-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMaxNTreeNode.hpp
39 lines (30 loc) · 1.16 KB
/
MaxNTreeNode.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef DOPPELKOPF_MAXNTREENODE_HPP
#define DOPPELKOPF_MAXNTREENODE_HPP
#include <utility>
#include <vector>
#include <numeric>
#include "Card.hpp"
class MaxNTreeNode {
public:
MaxNTreeNode() = default;
MaxNTreeNode(std::vector<Card *> availableCards,
std::vector<Card *> playerCards,
std::pair<std::vector<std::pair<Card *, int>>, int> currentTrick,
std::vector<std::pair<std::vector<std::pair<Card *, int>>, int>> allTricks,
int currentPlayer,
int playerID,
Card *playedCard);
std::pair<std::array<int, 4>, Card*> specMax(std::array<int, 4> pScore, std::array<int, 4> gpScore);
void generateTree(int maxDepth, int depth);
std::array<int, 4> evaluateState();
Card* playedCard;
std::vector<Card *> availableCards;
std::vector<Card *> playerCards;
std::pair<std::vector<std::pair<Card *, int>>, int> currentTrick;
std::vector<std::pair<std::vector<std::pair<Card *, int>>, int>> allTricks;
int currentPlayer;
int playerID;
MaxNTreeNode *parent;
std::vector<MaxNTreeNode> childNodes;
};
#endif //DOPPELKOPF_MAXNTREENODE_HPP