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.
breakthroughpine64backup/MNode.h

33 lines
790 B
C
Raw Permalink Normal View History

2015-10-29 08:58:32 -05:00
#pragma once
#include <iostream>
#include <vector>
#include "Board.h"
using namespace std;
class MNode {
vector<MNode*> children;
Board state;
moves mvs;
int minimax_val;
string type; //min or max
2015-10-29 08:58:32 -05:00
public:
MNode();
MNode(Board s, moves m, int mmval);
MNode(const MNode& n);
vector<MNode*> getChildren() const { return children; }
void addChild(MNode* n) { children.push_back(n); }
int getMMVal() const { return minimax_val; }
void setMMVal(int mmval);
2015-10-29 13:06:15 -05:00
Board getState() const { return state; }
2015-10-29 08:58:32 -05:00
void setState(Board s) { state = s; }
2015-10-29 13:06:15 -05:00
moves getMove() const { return mvs; }
2015-10-29 08:58:32 -05:00
void setMove(moves m) { mvs = m; }
string getType() { return type; }
void setType(string t) { type = t; }
2015-10-29 08:58:32 -05:00
bool hasChildren();
};
2015-10-29 13:06:15 -05:00
void printTree(int depth, MNode* n);