X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fendgame.cpp;h=e10f8d5da975646d236468f6dc251f0052df60bb;hb=0dbc72d82e7f5f314499b22a04dcef45edcdba9a;hp=66ee54d846044c90d03ec4dcaf9699e07aae13ee;hpb=96ac85b3196ed7369a91a0852da0adcaf05a04b3;p=stockfish
diff --git a/src/endgame.cpp b/src/endgame.cpp
index 66ee54d8..e10f8d5d 100644
--- a/src/endgame.cpp
+++ b/src/endgame.cpp
@@ -18,7 +18,6 @@
along with this program. If not, see .
*/
-#include
#include
#include "bitboard.h"
@@ -77,15 +76,40 @@ namespace {
if (file_of(pos.square(strongSide)) >= FILE_E)
sq = Square(sq ^ 7); // Mirror SQ_H1 -> SQ_A1
- if (strongSide == BLACK)
- sq = ~sq;
-
- return sq;
+ return strongSide == WHITE ? sq : ~sq;
}
} // namespace
+namespace Endgames {
+
+ std::pair