X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.cpp;h=c4c1a03705924516558ac8c5651b7bd63bc13bf5;hp=f6b27114b13d64f60fafbd24c74c9550b7053afe;hb=e0a8b364364c2a89c82d4f57fd3419ed5f1f872e;hpb=ef6fca98a0b70b82ba701e6969a80cd9daf78705 diff --git a/src/uci.cpp b/src/uci.cpp index f6b27114..c4c1a037 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -124,7 +124,7 @@ namespace { } else if (token == "ucinewgame") { - push_button("Clear Hash"); + push_button("New Game"); Position::init_piece_square_tables(); RootPosition.from_fen(StartPosition); } @@ -324,18 +324,17 @@ namespace { void perft(UCIInputParser& uip) { string token; - int depth = 0; + int depth, tm, n; + Position pos = RootPosition; - while (!uip.eof()) - { - uip >> token; + if (uip.eof()) + return; + + uip >> depth; + tm = get_system_time(); + + n = perft(pos, depth * OnePly); - if (token == "depth") - uip >> depth; - } - Position pos = RootPosition; - int tm = get_system_time(); - int n = perft(pos, depth * OnePly); tm = get_system_time() - tm; std::cout << "\nNodes " << n << "\nTime (ms) " << tm