37 lines
941 B
C++
37 lines
941 B
C++
#ifndef NODE_H
|
|
#define NODE_H
|
|
|
|
#include <vector>
|
|
#include <limits.h>
|
|
|
|
using namespace std;
|
|
|
|
class node
|
|
{
|
|
private:
|
|
node* parent;
|
|
int level;
|
|
int value;
|
|
vector<node> children;
|
|
int alpha;
|
|
int beta;
|
|
public:
|
|
node();
|
|
node(node *n);
|
|
void setParent(node* p) { parent = p; };
|
|
node* getParent() { return parent; };
|
|
void setLevel(int l) { level = l; };
|
|
int getLevel() { return level; };
|
|
void setValue(int v) { value = v; };
|
|
int getValue() { return value; };
|
|
void setChildren(vector<node> c) { children = c; };
|
|
void addChild(node n) { children.push_back(n); };
|
|
vector<node> getChildren() { return children; };
|
|
node* getChildAt(int i) { return &children.at(i); };
|
|
void setAlpha(int a) { alpha = a; };
|
|
int getAlpha() { return alpha; };
|
|
void setBeta(int b) { beta = b; };
|
|
int getBeta() { return beta; };
|
|
};
|
|
|
|
#endif
|