Put the root into a separate place.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 19 Mar 2016 21:22:57 +0000 (22:22 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 24 Nov 2018 10:17:41 +0000 (11:17 +0100)
src/hashprobe.proto
src/main.cpp

index b02a7a9..42f6b2b 100644 (file)
@@ -5,6 +5,7 @@ message HashProbeRequest {
        string fen = 1;
 }
 message HashProbeResponse {
+       HashProbeLine root = 2;
        repeated HashProbeLine line = 1;
 }
 message HashProbeLine {
index 299b413..d851bda 100644 (file)
@@ -54,8 +54,7 @@ public:
                bool invert = (pos.side_to_move() == BLACK);
                Search::StateStackPtr setup_states = Search::StateStackPtr(new std::stack<StateInfo>);
 
-               HashProbeLine *root_line = response->add_line();
-               ProbeMove(&pos, setup_states.get(), invert, root_line);
+               ProbeMove(&pos, setup_states.get(), invert, response->mutable_root());
 
                MoveList<LEGAL> moves(pos);
                for (const ExtMove* em = moves.begin(); em != moves.end(); ++em) {