- }
-
- /* Only generate moves at move nodes. */
- if (!move_prop)
- return;
-
- old_move = get_sgfmove(move_prop);
- color = (move_prop->name == SGFW) ? WHITE : BLACK;
-
- if (color == color_to_replay || color_to_replay == GRAY) {
- float new_move_value = 0.0;
- float old_move_value = 0.0;
-
- /* Get a move from the engine for color. */
- int resign;
- new_move = genmove(color, NULL, &resign);
-
- /* Pick up the relevant values from the potential_moves[] array. */
- if (new_move != PASS_MOVE)
- new_move_value = potential_moves[new_move];
- if (old_move != PASS_MOVE)
- old_move_value = potential_moves[old_move];
-
- /* Now report on how well the computer generated the move. */
- if (new_move != old_move || !quiet) {
- mprintf("Move %d (%C): ", movenum + 1, color);
-
- if (resign)
- printf("GNU Go resigns ");
- else {
- mprintf("GNU Go plays %1m ", new_move);
- if (new_move != PASS_MOVE)
- printf("(%.2f) ", new_move_value);
- }
-
- mprintf("- Game move %1m ", old_move);
- if (new_move != PASS_MOVE && old_move_value > 0.0)
- printf("(%.2f) ", old_move_value);
- printf("\n");
-
- *replay_score += new_move_value - old_move_value;
- *total_score += new_move_value;
- }
-
- if (new_move != old_move) {
- if (resign)
- gg_snprintf(buf, BUFSIZE, "GNU Go resigns - Game move %s (%.2f)",
- location_to_string(old_move), old_move_value);
- else {
- gg_snprintf(buf, BUFSIZE,
- "GNU Go plays %s (%.2f) - Game move %s (%.2f)",
- location_to_string(new_move), new_move_value,
- location_to_string(old_move), old_move_value);
- if (new_move != PASS_MOVE)
- sgfCircle(node, I(new_move), J(new_move));
- }
+
+ /* Only generate moves at move nodes. */
+ if (!move_prop)
+ return;
+
+ old_move = get_sgfmove(move_prop);
+ color = (move_prop->name == SGFW) ? WHITE : BLACK;
+
+ if (color == color_to_replay || color_to_replay == GRAY) {
+ float new_move_value = 0.0;
+ float old_move_value = 0.0;
+
+ /* Get a move from the engine for color. */
+ int resign;
+ new_move = genmove(color, NULL, &resign);
+
+ /* Pick up the relevant values from the potential_moves[] array. */
+ if (new_move != PASS_MOVE)
+ new_move_value = potential_moves[new_move];
+ if (old_move != PASS_MOVE)
+ old_move_value = potential_moves[old_move];
+
+ /* Now report on how well the computer generated the move. */
+ if (new_move != old_move || !quiet) {
+ mprintf("Move %d (%C): ", movenum + 1, color);
+
+ if (resign)
+ printf("GNU Go resigns ");
+ else {
+ mprintf("GNU Go plays %1m ", new_move);
+ if (new_move != PASS_MOVE)
+ printf("(%.2f) ", new_move_value);
+ }
+
+ mprintf("- Game move %1m ", old_move);
+ if (new_move != PASS_MOVE && old_move_value > 0.0)
+ printf("(%.2f) ", old_move_value);
+ printf("\n");
+
+ *replay_score += new_move_value - old_move_value;
+ *total_score += new_move_value;
+ }
+
+ if (new_move != old_move) {
+ if (resign)
+ gg_snprintf(buf, BUFSIZE, "GNU Go resigns - Game move %s (%.2f)",
+ location_to_string(old_move), old_move_value);
+ else {
+ gg_snprintf(buf, BUFSIZE,
+ "GNU Go plays %s (%.2f) - Game move %s (%.2f)",
+ location_to_string(new_move), new_move_value,
+ location_to_string(old_move), old_move_value);
+ if (new_move != PASS_MOVE)
+ sgfCircle(node, I(new_move), J(new_move));
+ }
+ } else
+ gg_snprintf(buf, BUFSIZE, "GNU Go plays the same move %s (%.2f)",
+ location_to_string(new_move), new_move_value);
+
+ sgfAddComment(node, buf);
+ sgffile_add_debuginfo(node, 0.0);