-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChanceNode.cpp
37 lines (28 loc) · 864 Bytes
/
ChanceNode.cpp
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
//
// Created by Xuefeng Huang on 2020/1/30.
//
#include "include/nodes/ChanceNode.h"
#include <utility>
ChanceNode::ChanceNode(const shared_ptr<GameTreeNode> children, GameTreeNode::GameRound round, double pot, shared_ptr<GameTreeNode> parent,
const vector<Card>& cards,bool donk): GameTreeNode(round,pot,std::move(parent)),cards(cards) {
this->children = children;
this->donk = donk;
}
const vector<Card>& ChanceNode::getCards() {
return this->cards;
}
shared_ptr<GameTreeNode> ChanceNode::getChildren() {
return this->children;
}
void ChanceNode::setChildren(shared_ptr<GameTreeNode> children){
this->children = children;
}
int ChanceNode::getPlayer() {
return this->player;
}
GameTreeNode::GameTreeNodeType ChanceNode::getType() {
return CHANCE;
}
bool ChanceNode::isDonk(){
return this->donk;
}