Catch more potential engine hangs

If the engine thinks the game is over, but we don't, report an error.
This commit is contained in:
Michael Catanzaro 2013-08-25 13:01:15 -05:00
parent ac4126cc8e
commit b72e2f5627

View file

@ -64,17 +64,18 @@ public class ChessEngineCECP : ChessEngine
}
}
if (line.has_prefix ("Illegal move: "))
{
stop ();
error ();
}
else if (line == "resign" || line == "tellics resign" ||
if (line == "resign" || line == "tellics resign" ||
(line.has_prefix ("1-0 {") && line.contains("resign")) ||
(line.has_prefix ("0-1 {") && line.contains("resign")))
{
resigned ();
}
else if (line.has_prefix ("Illegal move: ") ||
line.has_prefix ("1-0") || line.has_prefix ("0-1"))
{
stop ();
error ();
}
else if (line == "game is a draw" ||
line == "draw" ||
line == "Draw" ||