]> git.sesse.net Git - stockfish/blobdiff - src/bitbase.cpp
Rename NonSlidingAttacksBB[] in StepAttacksBB[]
[stockfish] / src / bitbase.cpp
index 5d20fbc6d896aa51c14188c3998cf46ed8c8585b..3d4fad991189ee8bba77469ca3d0dadb925b9a7c 100644 (file)
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
-////
-//// Includes
-////
-
 #include <cassert>
 
 #include "bitboard.h"
-#include "square.h"
-
-
-////
-//// Local definitions
-////
+#include "types.h"
 
 namespace {
 
@@ -47,9 +37,9 @@ namespace {
     bool is_legal() const;
     bool is_immediate_draw() const;
     bool is_immediate_win() const;
-    Bitboard wk_attacks()   const { return NonSlidingAttacksBB[WK][whiteKingSquare]; }
-    Bitboard bk_attacks()   const { return NonSlidingAttacksBB[BK][blackKingSquare]; }
-    Bitboard pawn_attacks() const { return NonSlidingAttacksBB[WP][pawnSquare]; }
+    Bitboard wk_attacks()   const { return StepAttacksBB[WK][whiteKingSquare]; }
+    Bitboard bk_attacks()   const { return StepAttacksBB[BK][blackKingSquare]; }
+    Bitboard pawn_attacks() const { return StepAttacksBB[WP][pawnSquare]; }
 
     Square whiteKingSquare, blackKingSquare, pawnSquare;
     Color sideToMove;
@@ -63,10 +53,6 @@ namespace {
 }
 
 
-////
-//// Functions
-////
-
 void generate_kpk_bitbase(uint8_t bitbase[]) {
 
   bool repeat;