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 {
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;
}
-////
-//// Functions
-////
-
void generate_kpk_bitbase(uint8_t bitbase[]) {
bool repeat;