diff options
| -rw-r--r-- | src/geminict.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/geminict.c b/src/geminict.c index d25b40c..dbba324 100644 --- a/src/geminict.c +++ b/src/geminict.c @@ -280,7 +280,7 @@ inline void negamax_display_progress(const uint8_t cur_depth, num_check += 1; } -static int negamax_turn(void) { +static enum TURN_RESULT negamax_turn(void) { if (won == 0xFF) { // Run the minimax num_check = 0; @@ -293,7 +293,7 @@ static int negamax_turn(void) { num_check); return handle_turn(negamax_ptn); } else { - return EXIT_FAILURE; + return T_ERR; } } @@ -356,7 +356,13 @@ int main(int argc, char **argv) { } } - negamax_turn(); + tr = negamax_turn(); + + if (tr == T_ERR) { + puts("This shouldn't happen, ct1986 encountered an error."); + print_everything(); + return EXIT_FAILURE; + } else if (tr == T_WIN) return EXIT_SUCCESS; print_everything(); |
