]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Convert also undo_null_move() to avoid passing UndoInfo object
[stockfish] / src / position.h
index f3bb011274e04616809c4b82018047c19d17c4d8..7300c9d7bd1b85c8b3125f5220d36ef787ce20d7 100644 (file)
@@ -87,6 +87,7 @@ struct UndoInfo {
   Move lastMove;
   Value mgValue, egValue;
   PieceType capture;
+  UndoInfo* previous;
 };
 
 
@@ -241,9 +242,9 @@ public:
 
   // Doing and undoing moves
   void do_move(Move m, UndoInfo &u);
-  void undo_move(Move m, const UndoInfo &u);
+  void undo_move(Move m);
   void do_null_move(UndoInfo &u);
-  void undo_null_move(const UndoInfo &u);
+  void undo_null_move();
 
   // Static exchange evaluation
   int see(Square from, Square to) const;
@@ -296,10 +297,10 @@ private:
   // Helper functions for doing and undoing moves
   void do_capture_move(Move m, PieceType capture, Color them, Square to);
   void do_castle_move(Move m);
-  void do_promotion_move(Move m, UndoInfo &u);
+  void do_promotion_move(Move m);
   void do_ep_move(Move m);
   void undo_castle_move(Move m);
-  void undo_promotion_move(Move m, const UndoInfo &u);
+  void undo_promotion_move(Move m);
   void undo_ep_move(Move m);
   void find_checkers();
 
@@ -356,6 +357,7 @@ private:
           Move lastMove;
           Value mgValue, egValue;
           PieceType capture;
+          UndoInfo* previous;
       };
   };