]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Move PieceValue[] and SlidingArray[] where they belong
[stockfish] / src / position.h
index b7a33bfada00a2202236802c4093f03f8d923dde..220bb31dac4cc431df03ca8358a4551283c49d06 100644 (file)
 #if !defined(POSITION_H_INCLUDED)
 #define POSITION_H_INCLUDED
 
-// Disable some silly and noisy warning from MSVC compiler
-#if defined(_MSC_VER)
-
-// Forcing value to bool 'true' or 'false' (performance warning)
-#pragma warning(disable: 4800)
-
-// Conditional expression is constant
-#pragma warning(disable: 4127)
-
-
-#endif
-
 ////
 //// Includes
 ////
@@ -146,7 +134,6 @@ public:
   };
 
   // Constructors
-  explicit Position(int threadID);
   Position(const Position& pos, int threadID);
   Position(const std::string& fen, int threadID);
 
@@ -278,8 +265,9 @@ public:
 
   // Reset the gamePly variable to 0
   void reset_game_ply();
-
   void inc_startpos_ply_counter();
+  int64_t nodes_searched() const;
+  void set_nodes_searched(int64_t n);
 
   // Position consistency check, for debugging
   bool is_ok(int* failedStep = NULL) const;
@@ -338,6 +326,7 @@ private:
   bool isChess960;
   int startPosPlyCounter;
   int threadID;
+  int64_t nodes;
   StateInfo* st;
 
   // Static variables
@@ -348,6 +337,8 @@ private:
   static Score PieceSquareTable[16][64];
   static Key zobExclusion;
   static const Value seeValues[8];
+  static const Value PieceValueMidgame[17];
+  static const Value PieceValueEndgame[17];
 };
 
 
@@ -355,6 +346,14 @@ private:
 //// Inline functions
 ////
 
+inline int64_t Position::nodes_searched() const {
+  return nodes;
+}
+
+inline void Position::set_nodes_searched(int64_t n) {
+  nodes = n;
+}
+
 inline Piece Position::piece_on(Square s) const {
   return board[s];
 }