This commit is contained in:
Joseph Redmon 2016-03-14 23:25:53 -07:00
parent 09fd5c8c84
commit 798ee38808

View File

@ -219,7 +219,7 @@ void test_go(char *filename, char *weightfile)
int index = indexes[i]; int index = indexes[i];
row = index / 19; row = index / 19;
col = 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 index = indexes[0];
int rec_row = index / 19; int rec_row = index / 19;
@ -241,16 +241,23 @@ void test_go(char *filename, char *weightfile)
color = -color; color = -color;
free(line); free(line);
continue; 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{ }else{
char g; char g;
num = sscanf(line, "%c %c %d", &g, &c, &row); num = sscanf(line, "%c %c %d", &g, &c, &row);
row = (inverted)?19 - row : row+1; row = (inverted)?19 - row : row-1;
col = c - 'A'; col = c - 'A';
if (col > 7 && noi) col -= 1; if (col > 7 && noi) col -= 1;
if (num == 3) board[row*19 + col] = 0; if (num == 3) board[row*19 + col] = 0;
} }
} else if(num == 2){ } else if(num == 2){
row = (inverted)?19 - row : row+1; row = (inverted)?19 - row : row-1;
col = c - 'A'; col = c - 'A';
if (col > 7 && noi) col -= 1; if (col > 7 && noi) col -= 1;
board[row*19 + col] = 1; board[row*19 + col] = 1;