- const int LinearCoefficients[6] = { 1709, -137, -1185, -166, 141, 59 };
-
- const int QuadraticCoefficientsSameColor[][6] = {
- { 0, 0, 0, 0, 0, 0 }, { 33, -6, 0, 0, 0, 0 }, { 29, 269, -12, 0, 0, 0 },
- { 0, 19, -4, 0, 0, 0 }, { -35, -10, 40, 95, 50, 0 }, { 52, 23, 78, 144, -11, -33 } };
-
- const int QuadraticCoefficientsOppositeColor[][6] = {
- { 0, 0, 0, 0, 0, 0 }, { -5, 0, 0, 0, 0, 0 }, { -33, 23, 0, 0, 0, 0 },
- { 17, 25, -3, 0, 0, 0 }, { 10, -2, -19, -67, 0, 0 }, { 69, 64, -41, 116, 137, 0 } };
-
- // Unmapped endgame evaluation and scaling functions, these
- // are accessed direcly and not through the function maps.
- EvaluationFunction<KmmKm> EvaluateKmmKm(WHITE);
- EvaluationFunction<KXK> EvaluateKXK(WHITE), EvaluateKKX(BLACK);
- ScalingFunction<KBPK> ScaleKBPK(WHITE), ScaleKKBP(BLACK);
- ScalingFunction<KQKRP> ScaleKQKRP(WHITE), ScaleKRPKQ(BLACK);
- ScalingFunction<KPsK> ScaleKPsK(WHITE), ScaleKKPs(BLACK);
- ScalingFunction<KPKP> ScaleKPKPw(WHITE), ScaleKPKPb(BLACK);
-
- Key KNNKMaterialKey, KKNNMaterialKey;
-}
-
-
-////
-//// Classes
-////
-
-typedef EndgameEvaluationFunctionBase EF;
-typedef EndgameScalingFunctionBase SF;
-
-/// See header for a class description. It is declared here to avoid
-/// to include <map> in the header file.
-
-class EndgameFunctions {
-public:
- EndgameFunctions();
- ~EndgameFunctions();
- template<class T> T* get(Key key) const;
-
-private:
- template<class T> void add(const string& keyCode);
-
- static Key buildKey(const string& keyCode);
- static const string swapColors(const string& keyCode);