diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-26 18:14:22 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | ef65e760347ff695654627934ac347fce4b63511 (patch) | |
| tree | 21e6bdcb22dff9c03d6037ec067fb5fe959f64be /src | |
| parent | de4f20f28afe23ecfc546ad242e5bb44710996cc (diff) | |
Small changes to build ct1986
Diffstat (limited to 'src')
| -rw-r--r-- | src/ct1986.c | 13 | ||||
| -rw-r--r-- | src/ctaklm.c | 1 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/ct1986.c b/src/ct1986.c index 2b0ffb5..ca22f15 100644 --- a/src/ct1986.c +++ b/src/ct1986.c @@ -145,10 +145,10 @@ main(int argc, char **argv) { if (lcd_begin() != EXIT_SUCCESS) return EXIT_FAILURE; - negamax_init_size(); - negamax_search_depth = 3; + negamax_search_depth = 3; new_game(5); + negamax_init(5); char *line = NULL; ssize_t read; @@ -168,9 +168,11 @@ main(int argc, char **argv) { human = 1; } } + free(line); + line = NULL; } else { playing = 0; - break; + human = 1; } } if (playing) { @@ -179,7 +181,10 @@ main(int argc, char **argv) { } } - cnn1986_cache_free(); + free(line); + free(gamelog); + negamax_free(); + lcd_end(); return EXIT_SUCCESS; } diff --git a/src/ctaklm.c b/src/ctaklm.c index 9b1c307..2e0e2b3 100644 --- a/src/ctaklm.c +++ b/src/ctaklm.c @@ -462,7 +462,6 @@ main(int argc, char **argv) { free(line); free(gamelog); - negamax_free(); return EXIT_SUCCESS; |
