]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Introduce CheckInfo struct
[stockfish] / src / position.h
index 09c630062dd3984ea5a2fcc0ffaa647c7ff4fe2a..9e476722955a3f012bbf9c6f67a867db41d3078e 100644 (file)
@@ -63,6 +63,18 @@ const int MaxGameLength = 220;
 //// Types
 ////
 
+/// struct checkInfo is initialized at c'tor time and keeps
+/// info used to detect if a move gives check.
+
+struct CheckInfo {
+
+    CheckInfo(const Position&);
+
+    Square ksq;
+    Bitboard dc;
+    Bitboard checkSq[8];
+};
+
 /// Castle rights, encoded as bit fields
 
 enum CastleRights {