+/// Endgame functions can be of two types depending on whether they return a
+/// Value or a ScaleFactor.
+template<EndgameType E>
+using eg_fun = std::conditional<(E < SCALING_FUNCTIONS), Value, ScaleFactor>;
+
+
+/// Base and derived templates for endgame evaluation and scaling functions