mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
bugsssss
This commit is contained in:
parent
09fd5c8c84
commit
798ee38808
13
src/go.c
13
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;
|
||||
|
Loading…
Reference in New Issue
Block a user