//// Includes
////
+#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
if (token == "moves")
{
Move move;
- UndoInfo u;
+ StateInfo st;
while (!uip.eof())
{
uip >> token;
move = move_from_string(RootPosition, token);
- RootPosition.do_move(move, u);
+ RootPosition.do_move(move, st);
if (RootPosition.rule_50_counter() == 0)
RootPosition.reset_game_ply();
}
+ // Our StateInfo st is about going out of scope,
+ // so save its content before they disappear.
+ RootPosition.setStartState(st);
}
}
}
if (moveTime)
infinite = true; // HACK
+ assert(RootPosition.is_ok());
+
think(RootPosition, infinite, ponder, RootPosition.side_to_move(), time,
inc, movesToGo, depth, nodes, moveTime, searchMoves);
}