]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Unify compute_mg_value() and compute_eg_value()
[stockfish] / src / position.h
index aaed663b79209620a490d276bc6b86a34c879d2f..11b9e2de13991e75fc2d94c28d5123dfded556dd 100644 (file)
@@ -315,10 +315,13 @@ private:
   Key compute_material_key() const;
 
   // Computing incremental evaluation scores and material counts
+  enum GamePhase {
+      MidGame,
+      EndGame
+  };
   Value mg_pst(Color c, PieceType pt, Square s) const;
   Value eg_pst(Color c, PieceType pt, Square s) const;
-  Value compute_mg_value() const;
-  Value compute_eg_value() const;
+  Value compute_value(GamePhase p) const;
   Value compute_non_pawn_material(Color c) const;
 
   // Bitboards