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>
Wed, 26 Dec 2018 09:43:37 +0000 (10:43 +0100)
src/hashprobe.proto
src/main.cpp

index b02a7a92fccac6313b4e5898893c06d61a6ee953..42f6b2b466abc4e27ac7bea0dde25c77a999d650 100644 (file)
@@ -5,6 +5,7 @@ message HashProbeRequest {
        string fen = 1;
 }
 message HashProbeResponse {
+       HashProbeLine root = 2;
        repeated HashProbeLine line = 1;
 }
 message HashProbeLine {
index 299b4135c8e351fa8be5895cb64d2173ec655484..d851bda055c2e63468165f0bfb3fa91a05d80c6e 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) {