2789 |
int good_move_found = 0; |
int good_move_found = 0; |
2790 |
int ko_values_have_been_added = 0; |
int ko_values_have_been_added = 0; |
2791 |
char blunder_tested[BOARDMAX]; |
char blunder_tested[BOARDMAX]; |
2792 |
float bestval; |
float bestval = 0.0; |
2793 |
int best_move; |
int best_move = NO_MOVE; |
2794 |
int pos; |
int pos; |
2795 |
|
|
2796 |
memset(blunder_tested, 0, sizeof(blunder_tested)); |
memset(blunder_tested, 0, sizeof(blunder_tested)); |
2801 |
|
|
2802 |
/* Search through all board positions for the highest valued move. */ |
/* Search through all board positions for the highest valued move. */ |
2803 |
for (pos = BOARDMIN; pos < BOARDMAX; pos++) { |
for (pos = BOARDMIN; pos < BOARDMAX; pos++) { |
2804 |
|
float tval = move[pos].final_value; |
2805 |
if (!ON_BOARD(pos) || move[pos].final_value == 0.0) |
if (!ON_BOARD(pos) || move[pos].final_value == 0.0) |
2806 |
continue; |
continue; |
2807 |
|
|
|
float tval = move[pos].final_value; |
|
|
|
|
2808 |
if (tval > bestval) { |
if (tval > bestval) { |
2809 |
if (is_legal(pos, color) || is_illegal_ko_capture(pos, color)) { |
if (is_legal(pos, color) || is_illegal_ko_capture(pos, color)) { |
2810 |
bestval = tval; |
bestval = tval; |