X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=0be3301a9e09467e9bc4970255f2e52c05696dcb;hp=50d1f170b90c44779064cc0d5a0858da4a95ea33;hb=ed72a1e9ba37a9fa2674da8f46bb0597a1721c2d;hpb=e6310b3469b07b6bbecf8d8f75367a655090f22b diff --git a/src/position.cpp b/src/position.cpp index 50d1f170..0be3301a 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -57,7 +57,7 @@ const string PieceToChar(" PNBRQK pnbrqk"); // from the bitboards and scan for new X-ray attacks behind it. template -PieceType min_attacker(const Bitboard* bb, const Square& to, const Bitboard& stmAttackers, +PieceType min_attacker(const Bitboard* bb, Square to, Bitboard stmAttackers, Bitboard& occupied, Bitboard& attackers) { Bitboard b = stmAttackers & bb[Pt]; @@ -77,14 +77,14 @@ PieceType min_attacker(const Bitboard* bb, const Square& to, const Bitboard& stm } template<> -PieceType min_attacker(const Bitboard*, const Square&, const Bitboard&, Bitboard&, Bitboard&) { +PieceType min_attacker(const Bitboard*, Square, Bitboard, Bitboard&, Bitboard&) { return KING; // No need to update bitboards: it is the last cycle } } // namespace -/// CheckInfo c'tor +/// CheckInfo constructor CheckInfo::CheckInfo(const Position& pos) { @@ -118,7 +118,7 @@ std::ostream& operator<<(std::ostream& os, const Position& pos) { } os << "\nFen: " << pos.fen() << "\nKey: " << std::hex << std::uppercase - << std::setfill('0') << std::setw(16) << pos.st->key << std::dec << "\nCheckers: "; + << std::setfill('0') << std::setw(16) << pos.key() << std::dec << "\nCheckers: "; for (Bitboard b = pos.checkers(); b; ) os << UCI::square(pop_lsb(&b)) << " ";