Hi!

I have noticed that Quarry violates the GTP specification when using a
handicap of 0 or 1. According to GTP v. 2, when the handicap command is
issued, the argument has to be at least 2, i.e. if there is no handicap,
the handicap command must not be used. GnuGO rejects a handicap of less
than 2 and Quarry will exit with an assertion violation on
assert(successful) in initialize_gtp_player.

I have used the following to be able to play without handicap, but I'm
not sure this is the right way to do it.

/Martin

Index: src/gui-gtk/gtk-goban-window.c
===================================================================
RCS file: /cvs/quarry/quarry/src/gui-gtk/gtk-goban-window.c,v
retrieving revision 1.11
diff -u -r1.11 gtk-goban-window.c
--- src/gui-gtk/gtk-goban-window.c      12 May 2004 21:27:09 -0000      1.11
+++ src/gui-gtk/gtk-goban-window.c      21 May 2004 09:18:52 -0000
@@ -1478,12 +1478,14 @@
          is_fixed_handicap = TRUE;
 
        if (is_fixed_handicap) {
-         *initialization_step = INITIALIZATION_FIXED_HANDICAP_SET;
-         gtp_client_set_fixed_handicap(client,
-                                       ((GtpClientResponseCallback)
-                                        initialize_gtp_player),
-                                       goban_window, handicap);
-         break;
+         if (handicap >= 2) {
+           *initialization_step = INITIALIZATION_FIXED_HANDICAP_SET;
+           gtp_client_set_fixed_handicap(client,
+                                         ((GtpClientResponseCallback)
+                                          initialize_gtp_player),
+                                         goban_window, handicap);
+           break;
+         }
        }
        else {
          if (client_color == BLACK) {



Reply via email to