[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] sgf-output behaviour change

From: Arend Bayer
Subject: [gnugo-devel] sgf-output behaviour change
Date: Tue, 27 Apr 2004 12:28:28 +0200 (CEST)

The patch below changes the behaviour of SGF-files generated by
--printsgf, one of the SGF-decide modes, or the GTP commands
start_sgftrace/finish_sgftrace resp. printsgf. The difference is that
loading the generated .sgf-file with e.g. cgoban will pop up the starting
position immediately (instead of the user having to move to the next node
manually). I find this more convenient.

The only call to sgfprint_board/sgffile_begindump that confused me was
the one guarded by if (metamachine) in load_and_analyze_sgf_file, since I
don't know why this code has to be different for metamachine at all. I
don't think it will be broken, however.


- start sgf trees right at the root node

Index: engine/sgffile.c
RCS file: /cvsroot/gnugo/gnugo/engine/sgffile.c,v
retrieving revision 1.30
diff -u -p -r1.30 sgffile.c
--- engine/sgffile.c    24 Jan 2004 04:04:56 -0000      1.30
+++ engine/sgffile.c    27 Apr 2004 09:48:32 -0000
@@ -203,7 +203,7 @@ sgffile_printboard(SGFTree *tree)
   SGFNode *node;
-  node = sgfAddChild(tree->lastnode);
+  node = tree->lastnode;
   /* Write the white stones to the file. */
   for (i = 0; i < board_size; i++) {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]