- if (token == "ucinewgame")
- pos.from_fen(StarFEN, false);
+ else if (token == "ponderhit")
+ {
+ // The opponent has played the expected move. GUI sends "ponderhit" if
+ // we were told to ponder on the same move the opponent has played. We
+ // should continue searching but switching from pondering to normal search.
+ Search::Limits.ponder = false;
+
+ if (Search::Signals.stopOnPonderhit)
+ Search::Signals.stop = true;
+ }
+
+ else if (token == "go")
+ go(pos, is);
+
+ else if (token == "ucinewgame")
+ { /* Avoid returning "Unknown command" */ }