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:
Marco Costalba
2015-08-04 09:00:52 +02:00
parent 68d61b80c6
commit e6310b3469
6 changed files with 109 additions and 109 deletions

View File

@@ -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);