forked from caltechcs2/othello
-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
48 lines (33 loc) · 973 Bytes
/
player.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
48
#ifndef __PLAYER_H__
#define __PLAYER_H__
#include <iostream>
#include <vector>
#include "common.h"
#include "board.h"
using namespace std;
class Player
{
private:
Side mySide;
Side oppSide;
Board * myBoard;
int heuristicScore[8][8] = {
{ 20, -3, 11, 8, 8, 11, -3, 20},
{ -3, -7, -4, 1, 1, -4, -7, -3},
{ 11, -4, 2, 2, 2, 2, -4, 11},
{ 8, 1, 2, -3, -3, 2, 1, 8},
{ 8, 1, 2, -3, -3, 2, 1, 8},
{ 11, -4, 2, 2, 2, 2, -4, 11},
{ -3, -7, -4, 1, 1, -4, -7, -3},
{ 20, -3, 11, 8, 8, 11, -3, 20},
};
int score_board(Board b, Side s);
int negascout(Board board, Side side, int alpha, int beta, int depth);
public:
Player(Side side);
~Player();
Move *doMove(Move *opponentsMove, int msLeft);
// Flag to tell if the player is running within the test_minimax context
bool testingMinimax;
};
#endif