]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Add syzygy support
[stockfish] / src / uci.cpp
index 1b91b451f3b62124ae267d28659ec656461f541e..dfcce4970a67eb6910b38002464fe7dae687eeb7 100644 (file)
@@ -274,9 +274,9 @@ Move UCI::to_move(const Position& pos, string& str) {
   if (str.length() == 5) // Junior could send promotion piece in uppercase
       str[4] = char(tolower(str[4]));
 
-  for (MoveList<LEGAL> it(pos); *it; ++it)
-      if (str == UCI::move(*it, pos.is_chess960()))
-          return *it;
+  for (const ExtMove& ms : MoveList<LEGAL>(pos))
+      if (str == UCI::move(ms.move, pos.is_chess960()))
+          return ms.move;
 
   return MOVE_NONE;
 }