-/// Endgame functions can be of two types according if return a Value or a
-/// ScaleFactor. Type eg_fun<int>::type equals to either ScaleFactor or Value
-/// depending if the template parameter is 0 or 1.
+/// Endgame functions can be of two types depending on whether they return a
+/// Value or a ScaleFactor.
+template<EndgameCode E> using
+eg_type = typename std::conditional<(E < SCALING_FUNCTIONS), Value, ScaleFactor>::type;