-/// Position::game_phase() calculates the game phase interpolating total non-pawn
-/// material between endgame and midgame limits.
-
-Phase Position::game_phase() const {
-
- Value npm = st->nonPawnMaterial[WHITE] + st->nonPawnMaterial[BLACK];
-
- npm = std::max(EndgameLimit, std::min(npm, MidgameLimit));
-
- return Phase(((npm - EndgameLimit) * PHASE_MIDGAME) / (MidgameLimit - EndgameLimit));
-}
-
-