diff options
| author | tslil clingman <tslil@posteo.de> | 2021-10-06 09:26:04 -0400 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | bcaa378f2dbbe73607e7201a675683f1ab0eecb6 (patch) | |
| tree | a9b0dbe617d63d7db08faff6ebc32b9b9de8ecfb /src | |
| parent | 3a4c7107d682b4219cc87a696ecfe3a6095512be (diff) | |
Corrected win screen in geminict
Diffstat (limited to 'src')
| -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(); |
