Remove the non-pretty moves from the protobuf, as it takes up a little CPU time for...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 20 Nov 2016 22:07:51 +0000 (23:07 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 24 Nov 2018 10:17:41 +0000 (11:17 +0100)
src/client.cpp
src/main.cpp

index a578790..a59b961 100644 (file)
@@ -14,7 +14,7 @@ using grpc::Status;
 using namespace hashprobe;
 
 std::string FormatMove(const HashProbeMove &move) {
-  if (move.from_sq().empty()) return "MOVE_NONE";
+  if (move.pretty().empty()) return "MOVE_NONE";
   return move.pretty();
 }
 
index 2117497..3e6369a 100644 (file)
@@ -81,13 +81,6 @@ void HashProbeImpl::FillMove(Position *pos, Move move, HashProbeMove* decoded) {
        if (type_of(move) == CASTLING) {
                to = make_square(to > from ? FILE_G : FILE_C, rank_of(from));
        }
-               
-       decoded->set_from_sq(UCI::square(from));
-       decoded->set_to_sq(UCI::square(to));
-
-       if (type_of(move) == PROMOTION) {
-               decoded->set_promotion(std::string() + " PNBRQK"[promotion_type(move)]);
-       }
 
        Piece moved_piece = pos->moved_piece(move);
        std::string pretty;