internal.h (1063B)
1 #ifndef STELLAR_ATTAKCS_INTERNAL_H 2 #define STELLAR_ATTAKCS_INTERNAL_H 3 4 #include "piece.h" // BLACK, WHITE 5 #include "utils.h" 6 7 extern U64 king_attacks[64]; // king attack table [square] 8 extern U64 knight_attacks[64]; // knight attack table [square] 9 extern U64 pawn_attacks[2][64]; // pawn attack table [side][square] 10 extern U64 rook_attacks[64][4096]; // rook attack table [square][occupancies] 11 extern U64 bishop_attacks[64][512]; // bishop attack table [square][occupancies] 12 13 extern U64 rook_masks[64]; // rook attack mask 14 extern U64 bishop_masks[64]; // bishop attack mask 15 16 extern const int rook_relevant_bits[64]; 17 extern const int bishop_relevant_bits[64]; 18 19 int hash(U64 key, U64 magic, int relevant_bits); 20 21 U64 set_occupancy(int index, int bits_in_mask, U64 attack_mask); 22 23 U64 bishop_mask(Square square); 24 U64 bishop_on_the_fly(Square square, U64 block); 25 U64 king_mask(Square square); 26 U64 knight_mask(Square square); 27 U64 pawn_mask(int side, Square square); 28 U64 rook_mask(Square square); 29 U64 rook_on_the_fly(Square square, U64 block); 30 31 #endif