gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] sgf output in play_solo.c


From: Gunnar Farneback
Subject: Re: [gnugo-devel] sgf output in play_solo.c
Date: Fri, 06 Sep 2002 22:16:06 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Paul wrote:
>   - trees in load and analyze, ascii and possibly some other modes
>     doesn't work well with -L option. however, previous approach
>     didn't work well either. fixing it can involve some deeper changes
>     in sgf handling. i think migration to trees should be finished
>     before dealing with this problem.

In what ways doesn't it work well?

> -    genmove(&i, &j, next);
> -    
> -    if (is_pass(POS(i, j))) {
> -      gprintf("%s move: PASS!\n", next == WHITE ? "white (O)" : "black (X)");
> -      sgffile_move_made(i, j, next, 0);
> -    }
> -    else {
> -      gprintf("%s move %m\n", next == WHITE ? "white (O)" : "black (X)",
> -             i, j);
> -      gnugo_play_move(i, j, next);
> -      sgffile_move_made(i, j, next, 0);
> -    }
> -  }
> +  move_val = gnugo_genmove(&i, &j, next);
> +
> +  if (is_pass(POS(i, j)))
> +    gprintf("%s move: PASS!\n", next == WHITE ? "white (O)" : "black (X)");
> +  else
> +    gprintf("%s move %m\n", next == WHITE ? "white (O)" : "black (X)",
> +      i, j);
> +  curnode = sgftreeNodeCheck(&sgftree, 0);
> +  curnode = sgfAddPlay(curnode, next, i, j);
> +  sgfAddComment(curnode, "load and analyze mode");
> +  sgffile_debuginfo(curnode, move_val);
> +  sgffile_output(sgftree.root);

I might be missing something, but shouldn't some kind of play_move()
call remain here?

> -      if (!sgffile_open_file(outfile)) {
> +      /*if (!sgffile_open_file(outfile)) {
>         fprintf(stderr, "Error: could not open '%s'\n", gg_optarg);
>         exit(EXIT_FAILURE);
> -      }
> +      }*/;

Wrong way to comment out code.

/Gunnar




reply via email to

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