X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.h;h=89f8f55685d0979b1cf6f07d748e897ee9df6c08;hp=75074f91bbe411199acd48a20e0e7b9c3d1bd8f6;hb=e304db9d1ecf6a2318708483c90fadecf4fac4ee;hpb=32c504076f5a1d5c84f88c2d30a11c25ea2e5a6e diff --git a/src/material.h b/src/material.h index 75074f91..89f8f556 100644 --- a/src/material.h +++ b/src/material.h @@ -27,13 +27,6 @@ const int MaterialTableSize = 8192; -/// Game phase -enum Phase { - PHASE_ENDGAME = 0, - PHASE_MIDGAME = 128 -}; - - /// MaterialEntry is a class which contains various information about a /// material configuration. It contains a material balance evaluation, /// a function pointer to a special endgame evaluation function (which in @@ -59,9 +52,9 @@ public: private: Key key; int16_t value; - uint8_t factor[2]; + uint8_t factor[COLOR_NB]; EndgameBase* evaluationFunction; - EndgameBase* scalingFunction[2]; + EndgameBase* scalingFunction[COLOR_NB]; int spaceWeight; Phase gamePhase; }; @@ -74,7 +67,7 @@ struct MaterialTable { MaterialEntry* probe(const Position& pos); static Phase game_phase(const Position& pos); - template static int imbalance(const int pieceCount[][8]); + template static int imbalance(const int pieceCount[][PIECE_TYPE_NB]); HashTable entries; Endgames endgames;