X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.cpp;h=1f1ba096ca6aa38edf39889d5e359dc07c96f9e9;hp=a64520050f084e481cc2804aba1dec5406f21c66;hb=174b40c28dd6f907ca093864ecaa73136694a7c5;hpb=3b1e64ab72cb2373b9e675ebcc8a1f7c94c71dfd diff --git a/src/uci.cpp b/src/uci.cpp index a6452005..1f1ba096 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -117,13 +117,13 @@ namespace { if (token == "uci") { cout << "id name " << engine_name() - << "\nid author Tord Romstad, Marco Costalba\n"; + << "\nid author Tord Romstad, Marco Costalba, Joona Kiiski\n"; print_uci_options(); cout << "uciok" << endl; } else if (token == "ucinewgame") { - TT.clear(); + push_button("Clear Hash"); Position::init_piece_square_tables(); RootPosition.from_fen(StartPosition); } @@ -210,9 +210,9 @@ namespace { if (RootPosition.rule_50_counter() == 0) RootPosition.reset_game_ply(); } - // Our StateInfo st is about going out of scope, - // so save its content before they disappear. - RootPosition.setStartState(st); + // Our StateInfo st is about going out of scope so copy + // its content inside RootPosition before they disappear. + RootPosition.saveState(); } } } @@ -242,6 +242,11 @@ namespace { } if (token == "value") { + // Skip whitespace. There should be a better way to do this, but + // I don't know how... + while(isspace(uip.get())); + uip.unget(); + getline(uip, token); // reads until end of line set_option_value(name, token); } else