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];
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;