Store moves sent with "position" UCI command

Store all the game moves until current position.

This will be used by next patch.

No functional change.
This commit is contained in:
Marco Costalba
2013-03-02 13:03:56 +01:00
parent 0e1ad3ad33
commit 0d68b523a3
6 changed files with 16 additions and 7 deletions

View File

@@ -357,8 +357,8 @@ void ThreadPool::wait_for_think_finished() {
// start_thinking() wakes up the main thread sleeping in MainThread::idle_loop()
// so to start a new search, then returns immediately.
void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits,
const std::vector<Move>& searchMoves, StateStackPtr& states) {
void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits, const std::vector<Move>& searchMoves,
StateStackPtr& setupStates, MovesVectPtr& setupMoves) {
wait_for_think_finished();
SearchTime = Time::now(); // As early as possible
@@ -368,7 +368,8 @@ void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits,
RootPos = pos;
Limits = limits;
SetupStates = states; // Ownership transfer here
SetupStates = setupStates; // Ownership transfer here
SetupMoves = setupMoves; // Ownership transfer here
RootMoves.clear();
for (MoveList<LEGAL> ml(pos); !ml.end(); ++ml)