]> git.sesse.net Git - stockfish/blobdiff - src/bitboard.h
Rename NonSlidingAttacksBB[] in StepAttacksBB[]
[stockfish] / src / bitboard.h
index 90deacd9e88fc1fe268b284730252051b0572e87..2a4ab1666b7509b42e80a932d11e536fc0071a2d 100644 (file)
@@ -21,8 +21,6 @@
 #if !defined(BITBOARD_H_INCLUDED)
 #define BITBOARD_H_INCLUDED
 
-#include "piece.h"
-#include "square.h"
 #include "types.h"
 
 const Bitboard EmptyBoardBB = 0;
@@ -55,7 +53,7 @@ extern const Bitboard InFrontBB[2][8];
 extern Bitboard SetMaskBB[65];
 extern Bitboard ClearMaskBB[65];
 
-extern Bitboard NonSlidingAttacksBB[16][64];
+extern Bitboard StepAttacksBB[16][64];
 extern Bitboard BetweenBB[64][64];
 
 extern Bitboard SquaresInFrontMask[2][64];
@@ -190,17 +188,13 @@ inline Bitboard bishop_attacks_bb(Square s, Bitboard blockers) {
 inline Bitboard rook_attacks_bb(Square s, Bitboard blockers) {
   Bitboard b = blockers & RMask[s];
   return RAttacks[RAttackIndex[s] +
-                  (unsigned(int(b) * int(RMult[s]) ^
-                            int(b >> 32) * int(RMult[s] >> 32))
-                   >> RShift[s])];
+        (unsigned(int(b) * int(RMult[s]) ^ int(b >> 32) * int(RMult[s] >> 32)) >> RShift[s])];
 }
 
 inline Bitboard bishop_attacks_bb(Square s, Bitboard blockers) {
   Bitboard b = blockers & BMask[s];
   return BAttacks[BAttackIndex[s] +
-                  (unsigned(int(b) * int(BMult[s]) ^
-                            int(b >> 32) * int(BMult[s] >> 32))
-                   >> BShift[s])];
+        (unsigned(int(b) * int(BMult[s]) ^ int(b >> 32) * int(BMult[s] >> 32)) >> BShift[s])];
 }
 
 #endif