After issuing "go"-command, at the end of the search
SF shows: "Unknown command: ...".
Spotted by Joona.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Position pos(StarFEN, false, 0); // The root position
string cmd, token;
Position pos(StarFEN, false, 0); // The root position
string cmd, token;
- while (getline(cin, cmd))
+ while (!quit && getline(cin, cmd))
{
istringstream is(cmd);
is >> skipws >> token;
if (token == "quit")
{
istringstream is(cmd);
is >> skipws >> token;
if (token == "quit")
- if (token == "go" && !go(pos, is))
- break;
+ else if (token == "go")
+ quit = !go(pos, is);
- if (token == "ucinewgame")
+ else if (token == "ucinewgame")
pos.from_fen(StarFEN, false);
else if (token == "isready")
pos.from_fen(StarFEN, false);
else if (token == "isready")