X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fendgame.h;h=4426ef186c5bacd4347bf94f712cbe08fef7a88a;hb=080a4995a3977a0fe7071e62151dc4d716a13302;hp=271490b186436395947fdf173c3c48cb5dad9a83;hpb=297c12e595ebc33e11be73ee4b188326418acb4f;p=stockfish diff --git a/src/endgame.h b/src/endgame.h index 271490b1..4426ef18 100644 --- a/src/endgame.h +++ b/src/endgame.h @@ -68,6 +68,7 @@ public: EndgameFunctionBase(Color c) : strongerSide(c), weakerSide(opposite_color(c)) {} virtual ~EndgameFunctionBase() {} virtual T apply(const Position&) = 0; + Color color() const { return strongerSide; } protected: Color strongerSide, weakerSide; @@ -81,12 +82,14 @@ typedef EndgameFunctionBase EndgameScalingFunctionBase; template struct EvaluationFunction : public EndgameEvaluationFunctionBase { + typedef EndgameEvaluationFunctionBase Base; explicit EvaluationFunction(Color c): EndgameEvaluationFunctionBase(c) {} Value apply(const Position&); }; template struct ScalingFunction : public EndgameScalingFunctionBase { + typedef EndgameScalingFunctionBase Base; explicit ScalingFunction(Color c) : EndgameScalingFunctionBase(c) {} ScaleFactor apply(const Position&); };