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
2015-11-02 16:19:42 -06:00

33 lines
No EOL
790 B
C++
Executable file

#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
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);
Board getState() const { return state; }
void setState(Board s) { state = s; }
moves getMove() const { return mvs; }
void setMove(moves m) { mvs = m; }
string getType() { return type; }
void setType(string t) { type = t; }
bool hasChildren();
};
void printTree(int depth, MNode* n);