-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathengine.hpp
More file actions
25 lines (20 loc) · 794 Bytes
/
engine.hpp
File metadata and controls
25 lines (20 loc) · 794 Bytes
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
#ifndef ENGINE_HPP
#define ENGINE_HPP
#include <utility>
#include "board.hpp"
class Engine {
public:
Engine();
std::pair<int, int> findBestMove(Board board);
private:
/**
* @brief returns a score for a single board position by repeatedly calling evaluateBoard() until a win, draw, or loss is reached
* @param board, reference to 2D array representing the game board
* @param isMax, boolean for whether or not we should maximise the score. We want to maximise for our score, minimise for the opponents
* @param depth, an integer representing the recursive level of the function call
* @return an integer representing the score the the given position, 0 means the position results in a draw
*/
int minimax(Board board, bool isMax, int depth);
int artificialDelay = 500;
};
#endif