mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Rename Position::list
Use Position::square and Position::squares instead.
This allow us to remove king_square(), simplify
endgames and to have more naming uniformity.
Moreover, this is a prerequisite step in case
in the future we decide to retire piece lists
altoghter and use pop_lsb() to loop across
pieces and serialize the moves. In this way
we just need to change definition of Position::square
to something like:
template<PieceType Pt> inline
Square Position::square(Color c) const {
return lsb(byColorBB[c]);
}
No functional change.
This commit is contained in:
@@ -110,7 +110,7 @@ namespace {
|
||||
Square s;
|
||||
bool passed, isolated, opposed, backward, lever, connected;
|
||||
Score score = SCORE_ZERO;
|
||||
const Square* pl = pos.list<PAWN>(Us);
|
||||
const Square* pl = pos.squares<PAWN>(Us);
|
||||
const Bitboard* pawnAttacksBB = StepAttacksBB[make_piece(Us, PAWN)];
|
||||
|
||||
Bitboard ourPawns = pos.pieces(Us , PAWN);
|
||||
|
||||
Reference in New Issue
Block a user