]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Moved a misplaced #endif in misc.cpp, which broke compilation in
[stockfish] / src / position.h
index 4514ca4c462cabeb8d14fcb866c42259328fa80c..3a5087c54f5cfa7483abf46a8de52440740b1724 100644 (file)
@@ -100,7 +100,7 @@ enum Phase {
 
 struct StateInfo {
   Key pawnKey, materialKey;
-  int castleRights, rule50, pliesFromNull;
+  int castleRights, rule50, gamePly, pliesFromNull;
   Square epSquare;
   Score value;
   Value npMaterial[2];
@@ -139,6 +139,9 @@ class Position {
   friend class MaterialInfo;
   friend class EndgameFunctions;
 
+  Position(); // No default or copy c'tor allowed
+  Position(const Position& pos);
+
 public:
   enum GamePhase {
       MidGame,
@@ -146,9 +149,9 @@ public:
   };
 
   // Constructors
-  Position();
-  explicit Position(const Position& pos);
-  explicit Position(const std::string& fen);
+  explicit Position(int threadID);
+  Position(const Position& pos, int threadID);
+  Position(const std::string& fen, int threadID);
 
   // Text input/output
   void from_fen(const std::string& fen);
@@ -271,6 +274,9 @@ public:
   bool opposite_colored_bishops() const;
   bool has_pawn_on_7th(Color c) const;
 
+  // Current thread ID searching on the position
+  int thread() const;
+
   // Reset the gamePly variable to 0
   void reset_game_ply();
 
@@ -323,11 +329,11 @@ private:
 
   // Other info
   Color sideToMove;
-  int gamePly;
   Key history[MaxGameLength];
   int castleRightsMask[64];
   StateInfo startState;
   File initialKFile, initialKRFile, initialQRFile;
+  int threadID;
   StateInfo* st;
 
   // Static variables
@@ -557,4 +563,8 @@ inline PieceType Position::captured_piece() const {
   return st->capture;
 }
 
+inline int Position::thread() const {
+  return threadID;
+}
+
 #endif // !defined(POSITION_H_INCLUDED)