generating pawn moves

This commit is contained in:
rektdie committed 2025-03-24 00:33:21 +01:00
1 parent 55c751fb89
commit 28ce0bc64c
8 files changed
+134 -598

No files matched your search

+30 -1
View File
@@ -3,15 +3,43 @@
#include "move.h"
#include "board.h"
enum MovegenMode {
All,
Noisy
};
namespace MOVEGEN {
inline Bitboard pawnAttacks[2][64];
inline Bitboard knightAttacks[64];
inline Bitboard kingAttacks[64];
void initLeaperAttacks();
void initSliderAttacks();
void GenAttackMaps(Board &board);
Bitboard getBishopAttack(int square, U64 occupancy);
Bitboard getRookAttack(int square, U64 occupancy);
Bitboard getQueenAttack(int square, U64 occupancy);
Bitboard getPawnPushes(int square, bool color, Bitboard &occupancy);
template <MovegenMode mode>
void GenPawnMoves(Board &board);
template <MovegenMode mode>
void GenKnightMoves(Board &board);
template <MovegenMode mode>
void GenRookMoves(Board &board);
template <MovegenMode mode>
void GenBishopMoves(Board &board);
template <MovegenMode mode>
void GenQueenMoves(Board &board);
template <MovegenMode mode>
void GenKingMoves(Board &board);
template <MovegenMode mode>
void GenerateMoves(Board &board);
// bishop relevant occupancy bit count
constexpr int bishopRelevantBits[64] = {
6, 5, 5, 5, 5, 5, 5, 6,
@@ -169,4 +197,5 @@ constexpr U64 bishopMagicNumbers[64] = {
0x8918844842082200ULL,
0x4010011029020020ULL
};
#include "movegen.tpp"
}