-
Notifications
You must be signed in to change notification settings - Fork 0
/
position.h
66 lines (54 loc) · 1.25 KB
/
position.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef POSITION_H
#define POSITION_H
#include <string>
#include "data.h"
#include "move.h"
#include "bitboards.h"
#include "pvTable.h"
struct posInfo
{
int move;
int enPass_sq;
int castleRights;
int fifty_move;
Key posKey;
};
class Position
{
public :
int pieces[sq_no];
BitBoard pawns[3];
int enPass_sq;
int castleRights;
int fifty_move;
int side;
int kingSq[2];
int ply;
int hisPly;
Key posKey;
int pceNum[13];
int bigPce[2];
int majPce[2];
int minPce[2];
int material[2];
int pList[13][10];
Hash_Table hashTable;
int pvArray[maxDepth];
int searchHistory[13][sq_no];
int searchKillers[2][maxDepth];
posInfo history[maxGameMoves];
void resetBoard();
void updateListMaterial();
void parseFEN(const std::string fenStr);
void display() const;
bool checkBoard() const;
bool isSqAttacked(const int sq, const int side) const;
void clearPiece(const int sq);
void addPiece(const int sq, const int pce);
void movePiece(const int from, const int to);
bool makeMove(int move);
void takeMove();
void makeNullMove();
void takeNullMove();
};
#endif // POSITION_H