X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.h;h=ab1c0ade8c65e987664236b9e77eb9d1da5dbf6f;hp=df2012fe6fa0b67bbe2ade133744d39ab4b8b6e7;hb=486ec580f98ee1f3072bc40278083091408205ec;hpb=a930aafce069c90349c6bf454f7e3b497fba6710 diff --git a/src/movepick.h b/src/movepick.h index df2012fe..ab1c0ade 100644 --- a/src/movepick.h +++ b/src/movepick.h @@ -94,6 +94,15 @@ 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.