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