-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEngine.h
47 lines (39 loc) · 963 Bytes
/
Engine.h
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
38
39
40
41
42
43
44
45
46
47
#pragma once
#include <string>
#include <random>
#include "Board.h"
#include "Player.h"
#include "Tree.h"
namespace chess {
class Engine
{
Board* board;
Player* playerWhite;
Player* playerBlack;
Player* playerEngine;
Player* playerUser;
Color colorOnMove;
bool isForceMode;
bool isAnalyzeMode;
unsigned short maxTreeDepth;
std::mt19937 generator;
std::uniform_int_distribution<int> distribution;
Tree* moveTree();
void swapPlayers(Player** player1, Player** player2);
public:
Engine();
~Engine();
void usermove(const std::string& input, std::string& output);
void newboard();
void go(std::string& output);
void enginemove(std::string& output);
void force();
void setboard(const std::string& input, std::string& output);
void analyze();
void exit();
int watchMoveScores(Tree* legalMoves);
int thinkingOutput(Tree* legalMoves);
long long treeBuildTime;
unsigned long long executedMoveCount;
};
}