]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Move __cpuid() definition for gcc in types.h
[stockfish] / src / position.h
index c4dbfcf6bef163aac51ab3b6a40bce43decb261d..d92ed1caf4c4067f479407a31c6bc07ceba7206e 100644 (file)
@@ -224,6 +224,9 @@ public:
   bool move_is_passed_pawn_push(Move m) const;
   bool move_attacks_square(Move m, Square s) const;
 
+  // Piece captured with previous moves
+  PieceType captured_piece() const;
+
   // Information about pawns
   bool pawn_is_passed(Color c, Square s) const;
   static bool pawn_is_passed(Bitboard theirPawns, Color c, Square s);
@@ -567,4 +570,8 @@ inline bool Position::move_is_capture_or_promotion(Move m) const {
   return (m & (0x1F << 12)) ? !move_is_castle(m) : !square_is_empty(move_to(m));
 }
 
+inline PieceType Position::captured_piece() const {
+  return st->capture;
+}
+
 #endif // !defined(POSITION_H_INCLUDED)