- // get_command() waits for a command from the user, and passes
- // this command to handle_command. get_command also intercepts
- // EOF from stdin, by translating EOF to the "quit" command. This
- // ensures that Stockfish exits gracefully if the GUI dies
- // unexpectedly.
-
- void get_command() {
-
- std::string command;
-
- if (!std::getline(std::cin, command))
- command = "quit";
-
- handle_command(command);
- }
-
-