]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Compute pinned and friends incrementally
[stockfish] / src / position.h
index 981bad3e846f31cb8459efd82f5884ba5d17aa62..11d31f8a80d17cb445f9d24e89bfd8f36393c0fd 100644 (file)
@@ -83,10 +83,10 @@ struct StateInfo {
   Key key, pawnKey, materialKey;
   int castleRights, rule50;
   Square epSquare;
-  Move lastMove;
   Value mgValue, egValue;
   PieceType capture;
   StateInfo* previous;
+  Move lastMove;
 };
 
 
@@ -240,6 +240,7 @@ public:
   bool square_is_weak(Square s, Color c) const;
 
   // Doing and undoing moves
+  void setStartState(const StateInfo& st);
   void do_move(Move m, StateInfo& st);
   void undo_move(Move m);
   void do_null_move(StateInfo& st);
@@ -302,7 +303,9 @@ private:
   void undo_promotion_move(Move m);
   void undo_ep_move(Move m);
   void find_checkers();
-  void find_pinned();
+  void find_hidden_checks(Color us);
+  void find_hidden_checks();
+  void update_hidden_checks(Square from, Square to);
 
   template<PieceType Piece>
   void update_checkers(Bitboard* pCheckersBB, Square ksq, Square from, Square to, Bitboard dcCandidates);