X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovepick.h;h=cbb69a014dd83373193b6ef0eb68eff5f912a688;hb=f8bc38a00650c5f4c71aec6f6d5503c7ae4c17a3;hp=df2012fe6fa0b67bbe2ade133744d39ab4b8b6e7;hpb=b3744eb4d0df5b9a2a78ef7de236b9a7aff7b6ca;p=stockfish diff --git a/src/movepick.h b/src/movepick.h index df2012fe..cbb69a01 100644 --- a/src/movepick.h +++ b/src/movepick.h @@ -1,13 +1,14 @@ /* - Glaurung, a UCI chess playing engine. - Copyright (C) 2004-2008 Tord Romstad - - Glaurung is free software: you can redistribute it and/or modify + Stockfish, a UCI chess playing engine derived from Glaurung 2.1 + Copyright (C) 2004-2008 Tord Romstad (Glaurung author) + Copyright (C) 2008 Marco Costalba + + Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - - Glaurung is distributed in the hope that it will be useful, + + Stockfish is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -94,6 +95,16 @@ private: //// Inline functions //// +/// MovePicker::number_of_moves() simply returns the numOfMoves member +/// variable. It is intended to be used in positions where the side to move +/// is in check, for detecting checkmates or situations where there is only +/// a single reply to check. + +inline int MovePicker::number_of_moves() const { + + return numOfMoves; +} + /// MovePicker::discovered_check_candidates() returns a bitboard containing /// all pieces which can possibly give discovered check. This bitboard is /// computed by the constructor function.