[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] arend_1_14.8
From: |
Arend Bayer |
Subject: |
[gnugo-devel] arend_1_14.8 |
Date: |
Thu, 15 Nov 2001 18:02:18 +0100 (CET) |
My last patch today :-) I assume I was not the only one being annoyed
by the sgf-outfile game infos always claiming that GnuGo played white.
-Arend
Index: play_gmp.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/play_gmp.c,v
retrieving revision 1.4
diff -U4 -r1.4 play_gmp.c
--- play_gmp.c 2001/09/15 21:21:53 1.4
+++ play_gmp.c 2001/11/15 16:38:40
@@ -104,13 +104,8 @@
TRACE("size=%d, handicap=%d, komi=%f\n",
gameinfo->position.boardsize, gameinfo->handicap,
gameinfo->position.komi);
- sgffile_write_gameinfo(gameinfo, "gmp");
- gameinfo->handicap = gnugo_sethand(&(gameinfo->position), gameinfo->handicap,
- sgftree.root);
- sgfOverwritePropertyInt(sgftree.root, "HA", gameinfo->handicap);
-
if (gameinfo->handicap)
to_move = WHITE;
else
to_move = BLACK;
@@ -122,8 +117,14 @@
else {
mycolor = BLACK;
yourcolor = WHITE;
}
+
+ gameinfo->computer_player = mycolor;
+ sgffile_write_gameinfo(gameinfo, "gmp");
+ gameinfo->handicap = gnugo_sethand(&(gameinfo->position), gameinfo->handicap,
+ sgftree.root);
+ sgfOverwritePropertyInt(sgftree.root, "HA", gameinfo->handicap);
/* main GMP loop */
while (passes < 2 && !time_to_die) {
Index: play_solo.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/play_solo.c,v
retrieving revision 1.5
diff -U4 -r1.5 play_solo.c
--- play_solo.c 2001/11/12 22:05:16 1.5
+++ play_solo.c 2001/11/15 16:38:41
@@ -146,12 +146,13 @@
/* We load the header to get correct boardsize, komi, and handicap
* for writing.
*/
gameinfo_load_sgfheader(gameinfo, head);
- sgffile_write_gameinfo(gameinfo, "load and analyze");
next = gameinfo_play_sgftree(gameinfo, head, untilstr);
if (to_move != EMPTY)
next = to_move;
+ gameinfo->computer_player = next;
+ sgffile_write_gameinfo(gameinfo, "load and analyze");
if (benchmark) {
for (r = 0; r < benchmark; ++r) {
genmove(&i, &j, next);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] arend_1_14.8,
Arend Bayer <=