From 318067f9e66b363b14e684492b7a1af021eb6a20 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 14 Sep 2022 19:15:50 +0300 Subject: feat: add initial attacksToSquare --- src/board.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/board.h') diff --git a/src/board.h b/src/board.h index e24a130..b63b494 100644 --- a/src/board.h +++ b/src/board.h @@ -17,7 +17,7 @@ typedef struct { BYTE enPassantSquare; } Board; -enum enumSquare { +typedef enum enumSquare { a1, b1, c1, d1, e1, f1, g1, h1, a2, b2, c2, d2, e2, f2, g2, h2, a3, b3, c3, d3, e3, f3, g3, h3, @@ -26,7 +26,7 @@ enum enumSquare { a6, b6, c6, d6, e6, f6, g6, h6, a7, b7, c7, d7, e7, f7, g7, h7, a8, b8, c8, d8, e8, f8, g8, h8 -}; +} enumSquare; static const char* notation[64] = { "a1", "b1", "c1", "d1", "e1", "f1", "g1", "h1", @@ -60,3 +60,10 @@ void printBoard(Board board); void precomputeKnightAttackTable(Bitboard table[64]); void precomputeKingAttackTable(Bitboard table[64]); void precomputePawnAttackTable(Bitboard table[64], BYTE color); + +extern Bitboard KNIGHT_ATTACKS[64]; +extern Bitboard WHITE_PAWN_ATTACKS[64]; +extern Bitboard BLACK_PAWN_ATTACKS[64]; + +Bitboard attacksToSquare(Board board, enumSquare sq); + -- cgit v1.2.3