diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-09-14 19:15:50 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-09-14 19:15:50 +0300 |
commit | 318067f9e66b363b14e684492b7a1af021eb6a20 (patch) | |
tree | 61008e7dc3b9aa4efb8e07ff83bcc42db2acabb0 /src/board.h | |
parent | a881be4856c6d3dc7675059d5a635d34434b5797 (diff) | |
download | j1chess-318067f9e66b363b14e684492b7a1af021eb6a20.tar.gz |
feat: add initial attacksToSquare
Diffstat (limited to 'src/board.h')
-rw-r--r-- | src/board.h | 11 |
1 files changed, 9 insertions, 2 deletions
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); + |