-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.cpp
More file actions
29 lines (26 loc) · 855 Bytes
/
Copy pathtypes.cpp
File metadata and controls
29 lines (26 loc) · 855 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
26
27
28
29
#include "types.h"
const int CHAR_TO_PIECE[] = {
['P'] = WHITE_PAWN,
['N'] = WHITE_KNIGHT,
['B'] = WHITE_BISHOP,
['R'] = WHITE_ROOK,
['Q'] = WHITE_QUEEN,
['K'] = WHITE_KING,
['p'] = BLACK_PAWN,
['n'] = BLACK_KNIGHT,
['b'] = BLACK_BISHOP,
['r'] = BLACK_ROOK,
['q'] = BLACK_QUEEN,
['k'] = BLACK_KING,
};
const char* PIECE_TO_CHAR = "PpNnBbRrQqKk";
const char* SQ_TO_COORD[64] = {
"a8", "b8", "c8", "d8", "e8", "f8", "g8", "h8", //
"a7", "b7", "c7", "d7", "e7", "f7", "g7", "h7", //
"a6", "b6", "c6", "d6", "e6", "f6", "g6", "h6", //
"a5", "b5", "c5", "d5", "e5", "f5", "g5", "h5", //
"a4", "b4", "c4", "d4", "e4", "f4", "g4", "h4", //
"a3", "b3", "c3", "d3", "e3", "f3", "g3", "h3", //
"a2", "b2", "c2", "d2", "e2", "f2", "g2", "h2", //
"a1", "b1", "c1", "d1", "e1", "f1", "g1", "h1", //
};