aboutsummaryrefslogtreecommitdiff
path: root/src/board.h
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-09-14 05:27:30 +0300
committereug-vs <eugene@eug-vs.xyz>2022-09-14 05:27:30 +0300
commit6f7cfbfcde39a57a59db17882339fa26055b75a0 (patch)
treeb2477a1b5c9fef015b62664e96b054f374ac3e14 /src/board.h
parent8e1d090e0f5c8d2e72fc1e90c22404a9ef808606 (diff)
downloadj1chess-6f7cfbfcde39a57a59db17882339fa26055b75a0.tar.gz
feat: precompute king attack tables
Diffstat (limited to 'src/board.h')
-rw-r--r--src/board.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/board.h b/src/board.h
index c9d8153..11b0c71 100644
--- a/src/board.h
+++ b/src/board.h
@@ -11,6 +11,7 @@
#define KING 0b1010
typedef U64 Bitboard;
+#define BIT (U64)1
typedef struct {
Bitboard pieces[12];
@@ -56,6 +57,7 @@ static const char* pieces[] = {
};
void precompute_knight_attack_table();
+void precompute_king_attack_table();
void print_bitboard(Bitboard bb);
int pop_count(Bitboard bb);
void print_board(Board board);