// Static variables
static Score pieceSquareTable[16][64]; // [piece][square]
static Key zobrist[2][8][64]; // [color][pieceType][square]/[piece count]
- static Key zobEp[64]; // [square]
+ static Key zobEp[8]; // [file]
static Key zobCastle[16]; // [castleRight]
static Key zobSideToMove;
static Key zobExclusion;
template<PieceType Pt>
inline Bitboard Position::attacks_from(Square s) const {
- return Pt == BISHOP ? bishop_attacks_bb(s, occupied_squares())
- : Pt == ROOK ? rook_attacks_bb(s, occupied_squares())
+ return Pt == BISHOP || Pt == ROOK ? attacks_bb<Pt>(s, occupied_squares())
: Pt == QUEEN ? attacks_from<ROOK>(s) | attacks_from<BISHOP>(s)
- : StepAttacksBB[Pt][s];
+ : StepAttacksBB[Pt][s];
}
template<>