diff --git a/src/go.c b/src/go.c index 55e01f3b..aaf59bc0 100644 --- a/src/go.c +++ b/src/go.c @@ -219,7 +219,7 @@ void test_go(char *filename, char *weightfile) int index = indexes[i]; row = index / 19; col = index % 19; - printf("Suggested: %c %d, %.2f%%\n", col + 'A' + 1*(col > 7 && noi), (inverted)?19 - row : row+1, move[index]*100); + printf("Suggested: %c %d, %.2f%%\n", col + 'A' + 1*(col > 7 && noi), (inverted)?19 - row : row-1, move[index]*100); } int index = indexes[0]; int rec_row = index / 19; @@ -241,16 +241,23 @@ void test_go(char *filename, char *weightfile) color = -color; free(line); continue; + } else if(c=='b' || c == 'w'){ + char g; + num = sscanf(line, "%c %c %d", &g, &c, &row); + row = (inverted)?19 - row : row-1; + col = c - 'A'; + if (col > 7 && noi) col -= 1; + if (num == 3) board[row*19 + col] = (g == 'b') ? color : -color; }else{ char g; num = sscanf(line, "%c %c %d", &g, &c, &row); - row = (inverted)?19 - row : row+1; + row = (inverted)?19 - row : row-1; col = c - 'A'; if (col > 7 && noi) col -= 1; if (num == 3) board[row*19 + col] = 0; } } else if(num == 2){ - row = (inverted)?19 - row : row+1; + row = (inverted)?19 - row : row-1; col = c - 'A'; if (col > 7 && noi) col -= 1; board[row*19 + col] = 1;