Fix tablebase initialization (#2)
authorianfab <ianfab@users.noreply.github.com>
Mon, 2 Jul 2018 21:53:31 +0000 (23:53 +0200)
committerianfab <ianfab@users.noreply.github.com>
Mon, 2 Jul 2018 21:53:31 +0000 (23:53 +0200)
src/syzygy/tbprobe.cpp

index 3951140..6490298 100644 (file)
@@ -67,7 +67,8 @@ inline WDLScore operator-(WDLScore d) { return WDLScore(-int(d)); }
 inline Square operator^=(Square& s, int i) { return s = Square(int(s) ^ i); }
 inline Square operator^(Square s, int i) { return Square(int(s) ^ i); }
 
-const std::string PieceToChar = " PNBRQK  pnbrqk";
+const std::string PieceToChar(  " PNBRQ" + std::string(KING - QUEEN - 1, ' ') + "K" + std::string(PIECE_TYPE_NB - KING - 1, ' ')
+                              + " pnbrq" + std::string(KING - QUEEN - 1, ' ') + "k" + std::string(PIECE_TYPE_NB - KING - 1, ' '));
 
 int MapPawns[SQUARE_NB];
 int MapB1H1H7[SQUARE_NB];