aboutsummaryrefslogtreecommitdiff
path: root/src/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/board.h')
-rw-r--r--src/board.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/board.h b/src/board.h
index cf89794..e3309e2 100644
--- a/src/board.h
+++ b/src/board.h
@@ -1,4 +1,4 @@
-#include "types.h"
+#include "bitboard.h"
#define WHITE 0b0000
#define BLACK 0b0001
@@ -10,9 +10,6 @@
#define QUEEN 0b1000
#define KING 0b1010
-typedef U64 Bitboard;
-#define BIT (U64)1
-
typedef struct {
Bitboard pieces[12];
BYTE side;
@@ -31,11 +28,6 @@ enum enumSquare {
a8, b8, c8, d8, e8, f8, g8, h8
};
-#define notAFile 0xFEFEFEFEFEFEFEFE
-#define notBFile 0xFDFDFDFDFDFDFDFD
-#define notGFile 0xBFBFBFBFBFBFBFBF
-#define notHFile 0x7F7F7F7F7F7F7F7F
-
static const char* notation[64] = {
"a1", "b1", "c1", "d1", "e1", "f1", "g1", "h1",
"a2", "b2", "c2", "d2", "e2", "f2", "g2", "h2",
@@ -56,11 +48,15 @@ static const char* pieces[] = {
"♚", "♔",
};
-void print_bitboard(Bitboard bb);
-int pop_count(Bitboard bb);
-void print_board(Board board);
+#define notAFile 0xFEFEFEFEFEFEFEFE
+#define notBFile 0xFDFDFDFDFDFDFDFD
+#define notGFile 0xBFBFBFBFBFBFBFBF
+#define notHFile 0x7F7F7F7F7F7F7F7F
+
Board parse_FEN(char* FEN);
+void print_board(Board board);
+
void precompute_knight_attack_table(Bitboard table[64]);
void precompute_king_attack_table(Bitboard table[64]);
void precompute_pawn_attack_table(Bitboard table[64], BYTE color);