]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Better document king safety evaluation
[stockfish] / src / position.h
index 9e476722955a3f012bbf9c6f67a867db41d3078e..f6e49687de45c7b7bf2e5cb04ef61c5ff5ee9b5f 100644 (file)
@@ -71,7 +71,7 @@ struct CheckInfo {
     CheckInfo(const Position&);
 
     Square ksq;
-    Bitboard dc;
+    Bitboard dcCandidates;
     Bitboard checkSq[8];
 };
 
@@ -218,7 +218,7 @@ public:
   bool pl_move_is_legal(Move m, Bitboard pinned) const;
   bool pl_move_is_evasion(Move m, Bitboard pinned) const;
   bool move_is_check(Move m) const;
-  bool move_is_check(Move m, Bitboard dcCandidates) const;
+  bool move_is_check(Move m, const CheckInfo& ci) const;
   bool move_is_capture(Move m) const;
   bool move_is_capture_or_promotion(Move m) const;
   bool move_is_passed_pawn_push(Move m) const;
@@ -236,7 +236,7 @@ public:
   // Doing and undoing moves
   void saveState();
   void do_move(Move m, StateInfo& st);
-  void do_move(Move m, StateInfo& st, Bitboard dcCandidates);
+  void do_move(Move m, StateInfo& st, const CheckInfo& ci, bool moveIsCheck);
   void undo_move(Move m);
   void do_null_move(StateInfo& st);
   void undo_null_move();
@@ -296,9 +296,6 @@ private:
   void undo_castle_move(Move m);
   void find_checkers();
 
-  template<PieceType Piece>
-  void update_checkers(Bitboard* pCheckersBB, Square ksq, Square from, Square to, Bitboard dcCandidates);
-
   template<bool FindPinned>
   Bitboard hidden_checkers(Color c) const;