This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
csce420pine64backup/hw2/hw2pr1/node.h

38 lines
941 B
C
Raw Permalink Normal View History

2017-10-25 07:34:40 -05:00
#ifndef NODE_H
#define NODE_H
#include <vector>
2017-10-30 11:45:17 -05:00
#include <limits.h>
2017-10-25 07:34:40 -05:00
using namespace std;
class node
{
private:
node* parent;
int level;
2017-10-27 11:42:51 -05:00
int value;
2017-10-25 07:34:40 -05:00
vector<node> children;
2017-10-30 11:45:17 -05:00
int alpha;
int beta;
2017-10-25 07:34:40 -05:00
public:
2017-10-27 11:42:51 -05:00
node();
node(node *n);
2017-10-25 07:34:40 -05:00
void setParent(node* p) { parent = p; };
node* getParent() { return parent; };
void setLevel(int l) { level = l; };
int getLevel() { return level; };
2017-10-27 11:42:51 -05:00
void setValue(int v) { value = v; };
int getValue() { return value; };
2017-10-25 07:34:40 -05:00
void setChildren(vector<node> c) { children = c; };
void addChild(node n) { children.push_back(n); };
vector<node> getChildren() { return children; };
2017-10-27 11:42:51 -05:00
node* getChildAt(int i) { return &children.at(i); };
2017-10-30 11:45:17 -05:00
void setAlpha(int a) { alpha = a; };
int getAlpha() { return alpha; };
void setBeta(int b) { beta = b; };
int getBeta() { return beta; };
2017-10-25 07:34:40 -05:00
};
#endif