X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fbitbase.cpp;h=0c3230f2aa9c0e9619fbe6f607eae4a77a1df066;hb=c2511243b40964e5ed5f35447baf5663a72da72a;hp=ac03120f5f97cb59a6c868fca9698f4ffc38d6a9;hpb=469e7c5143af0785d6ba41cdef731ac1f403141c;p=stockfish diff --git a/src/bitbase.cpp b/src/bitbase.cpp index ac03120f..0c3230f2 100644 --- a/src/bitbase.cpp +++ b/src/bitbase.cpp @@ -17,20 +17,10 @@ along with this program. If not, see . */ - -//// -//// Includes -//// - #include #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 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; @@ -63,10 +53,6 @@ namespace { } -//// -//// Functions -//// - void generate_kpk_bitbase(uint8_t bitbase[]) { bool repeat;