[gnome-chess] Catch more resigns from CECP engines
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] Catch more resigns from CECP engines
- Date: Sun, 25 Aug 2013 18:00:12 +0000 (UTC)
commit ac4126cc8e0381cc6a0297a17f1fa1ef25791d4f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Aug 25 12:58:53 2013 -0500
Catch more resigns from CECP engines
It's actually valid to resign via a comment to the RESULT command. Sigh.
https://bugzilla.gnome.org/show_bug.cgi?id=705012
src/chess-engine-cecp.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/chess-engine-cecp.vala b/src/chess-engine-cecp.vala
index 53d879a..ed399a8 100644
--- a/src/chess-engine-cecp.vala
+++ b/src/chess-engine-cecp.vala
@@ -69,7 +69,9 @@ public class ChessEngineCECP : ChessEngine
stop ();
error ();
}
- else if (line == "resign" || line == "tellics resign")
+ else if (line == "resign" || line == "tellics resign" ||
+ (line.has_prefix ("1-0 {") && line.contains("resign")) ||
+ (line.has_prefix ("0-1 {") && line.contains("resign")))
{
resigned ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]