X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=20c56ad3819b5417c6ae482750334a1e0a475d60;hp=a47098a8d61d200284bf0ab6dc0632cc73871594;hb=dae4e7df07061c01c60bee182cf7e54f4743beb8;hpb=74f1efee263aadcceb1df716ebd87776b932238a diff --git a/src/position.h b/src/position.h index a47098a8..20c56ad3 100644 --- a/src/position.h +++ b/src/position.h @@ -117,6 +117,7 @@ struct UndoInfo { class Position { friend class MaterialInfo; + friend class EndgameFunctions; public: // Constructors @@ -127,7 +128,7 @@ public: // Text input/output void from_fen(const std::string &fen); const std::string to_fen() const; - void print() const; + void print(Move m = MOVE_NONE) const; // Copying void copy(const Position &pos); @@ -173,13 +174,13 @@ public: // Number of pieces of each color and type int piece_count(Color c, PieceType pt) const; - // The en passant square: + // The en passant square Square ep_square() const; // Current king position for each color Square king_square(Color c) const; - // Castling rights. + // Castling rights bool can_castle_kingside(Color c) const; bool can_castle_queenside(Color c) const; bool can_castle(Color c) const; @@ -252,6 +253,7 @@ public: // Static exchange evaluation int see(Square from, Square to) const; int see(Move m) const; + int see(Square to) const; // Accessing hash keys Key get_key() const; @@ -297,6 +299,7 @@ private: void allow_ooo(Color c); // 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_ep_move(Move m);