X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=9b5ab9234e8c506eb1e50446ba32faead5e37e7e;hp=c221c749e2fba989646170b9f62e68b038457e37;hb=29b5842da8d5477c0aea924cfd364c9e619456a2;hpb=3e2591d83c285597a7400c79b61ab9dc38875163 diff --git a/src/position.cpp b/src/position.cpp index c221c749..9b5ab923 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -2,6 +2,7 @@ Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad + Copyright (C) 2015-2016 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +24,7 @@ #include #include -#include "bitcount.h" +#include "bitboard.h" #include "misc.h" #include "movegen.h" #include "position.h" @@ -84,7 +85,7 @@ PieceType min_attacker(const Bitboard*, Square, Bitboard, Bitboard&, Bitbo } // namespace -/// CheckInfo c'tor +/// CheckInfo constructor CheckInfo::CheckInfo(const Position& pos) { @@ -118,7 +119,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)) << " "; @@ -1169,7 +1170,7 @@ bool Position::pos_is_ok(int* failedStep) const { for (Color c = WHITE; c <= BLACK; ++c) for (PieceType pt = PAWN; pt <= KING; ++pt) { - if (pieceCount[c][pt] != popcount(pieces(c, pt))) + if (pieceCount[c][pt] != popcount(pieces(c, pt))) return false; for (int i = 0; i < pieceCount[c][pt]; ++i)