X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.h;h=b7a33bfada00a2202236802c4093f03f8d923dde;hb=141caf1d5b642bab826e2e8a7ab043b8c4928250;hp=6d7ea0ef30bcd990b98f9d976137d091575f04cb;hpb=252537fd9c8cb60f765ea390d2464a42adeafc0a;p=stockfish diff --git a/src/position.h b/src/position.h index 6d7ea0ef..b7a33bfa 100644 --- a/src/position.h +++ b/src/position.h @@ -50,9 +50,6 @@ //// Constants //// -/// FEN string for the initial position -const std::string StartPositionFEN = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"; - /// Maximum number of plies per game (220 should be enough, because the /// maximum search depth is 100, and during position setup we reset the /// move counter for every non-reversible move). @@ -246,7 +243,6 @@ public: // Static exchange evaluation int see(Square from, Square to) const; int see(Move m) const; - int see(Square to) const; int see_sign(Move m) const; // Accessing hash keys @@ -275,6 +271,7 @@ public: // Other properties of the position bool opposite_colored_bishops() const; bool has_pawn_on_7th(Color c) const; + bool is_chess960() const; // Current thread ID searching on the position int thread() const; @@ -338,6 +335,7 @@ private: int castleRightsMask[64]; StateInfo startState; File initialKFile, initialKRFile, initialQRFile; + bool isChess960; int startPosPlyCounter; int threadID; StateInfo* st; @@ -349,6 +347,7 @@ private: static Key zobSideToMove; static Score PieceSquareTable[16][64]; static Key zobExclusion; + static const Value seeValues[8]; }; @@ -377,11 +376,11 @@ inline bool Position::square_is_occupied(Square s) const { } inline Value Position::midgame_value_of_piece_on(Square s) const { - return piece_value_midgame(piece_on(s)); + return PieceValueMidgame[piece_on(s)]; } inline Value Position::endgame_value_of_piece_on(Square s) const { - return piece_value_endgame(piece_on(s)); + return PieceValueEndgame[piece_on(s)]; } inline Color Position::side_to_move() const { @@ -558,6 +557,11 @@ inline bool Position::has_pawn_on_7th(Color c) const { return pieces(PAWN, c) & relative_rank_bb(c, RANK_7); } +inline bool Position::is_chess960() const { + + return isChess960; +} + inline bool Position::move_is_capture(Move m) const { // Move must not be MOVE_NONE !