-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer.hpp
41 lines (31 loc) · 937 Bytes
/
player.hpp
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
#ifndef __PLAYER_H__
#define __PLAYER_H__
#include <iostream>
#include <vector>
#include <cstdlib>
#include <stdlib.h>
#include "common.hpp"
#include "board.hpp"
using namespace std;
class Player {
public:
Player(Side side);
~Player();
Board* board;
int spaces_left(Board* board);
int mini_score(int depth, int max_depth, Side side, Board* board);
Move* minimax(int depth, int max_depth, Side side, Board* board);
Move* minimax_naive();
int get_num_moves(Side side);
int heuristicScore(Move* move, Board* board, Side side);
int naiveHeuristic(Move* move, Board* board, Side side);
Move *randomMove(vector<Move*> moves);
vector<Move*> get_moves(Side side, Board* board);
Move *doMove(Move *opponentsMove, int msLeft);
// Flag to tell if the player is running within the test_minimax context
bool testingMinimax;
private:
Side my_side;
Side opposite_side;
};
#endif