Martin Godisch wrote: > Here is another one...
Out of curiosity, why do you receieve wishes for GNU Go? Do you maintain a GNU Go package? > On Tue, Feb 22, 2005 at 03:55:06 -0500, Jim W. Jaszewski wrote: > > Stepping thru a loaded game in ascii mode, it gets hard to see where the > > next stone has just been put -- because unlike during live play, there > > are no brackets around the last move made. > > (X) (O) Right? > > > > For that matter, that last move could be displayed somewhere on the > > screen. > > > > And for that matter, all the moves could likely be displayed along the > > right-hand side of the screen..! This simple patch makes the last move always visible, unless it happens to be a pass move, and also prints it to the right of the board. I didn't try to implement move history. However, I suggest that you use some client with GNU Go as ASCII mode is very old, inconvenient and almost not supported. Try googling for something like ``GTP client GNU Go'', maybe also specifying your OS. Paul --- play_ascii.c 10 Jan 2005 15:20:15 +0200 1.52 +++ play_ascii.c 22 Feb 2005 17:25:09 +0200 @@ -52,8 +52,6 @@ showterri display territory\n\ static int opt_showboard = 1; static int showdead = 0; static SGFTree sgftree; -static int last_move_i; /* The position of the last move */ -static int last_move_j; /* -""- */ static int resignation_allowed; /* Unreasonable score used to detect missing information. */ @@ -194,6 +192,7 @@ ascii_showboard(void) int last_pos_was_move; int pos_is_move; int dead; + int last_move = get_last_move(); make_letterbar(board_size, letterbar); set_handicap_spots(board_size); @@ -217,14 +216,22 @@ ascii_showboard(void) printf("\n"); fflush(stdout); - printf("%s\n", letterbar); + printf("%s", letterbar); + + if (get_last_player() != EMPTY) { + gfprintf(stdout, " Last move: %s %1m", + get_last_player() == WHITE ? "White" : "Black", + last_move); + } + + printf("\n"); fflush(stdout); for (i = 0; i < board_size; i++) { printf(" %2d", board_size - i); last_pos_was_move = 0; for (j = 0; j < board_size; j++) { - if (last_move_i == i && last_move_j == j) + if (POS(i, j) == last_move) pos_is_move = 128; else pos_is_move = 0; @@ -471,9 +478,6 @@ computer_move(Gameinfo *gameinfo, int *p gnugo_estimate_score(&upper_bound, &lower_bound); current_score_estimate = (int) ((lower_bound + upper_bound) / 2.0); } - - last_move_i = i; - last_move_j = j; mprintf("%s(%d): %m\n", color_to_string(gameinfo->to_move), movenum+1, i, j); @@ -520,9 +524,6 @@ do_move(Gameinfo *gameinfo, char *comman sgffile_add_debuginfo(sgftree.lastnode, 0.0); sgftreeAddPlay(&sgftree, gameinfo->to_move, i, j); sgffile_output(&sgftree); - - last_move_i = i; - last_move_j = j; if (opt_showboard) { ascii_showboard(); _______________________________________________ gnugo-devel mailing list gnugo-devel@gnu.org http://lists.gnu.org/mailman/listinfo/gnugo-devel