diff options
Diffstat (limited to 'src/ctaklm.c')
| -rw-r--r-- | src/ctaklm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ctaklm.c b/src/ctaklm.c index cf7d0c4..c361f70 100644 --- a/src/ctaklm.c +++ b/src/ctaklm.c @@ -235,12 +235,12 @@ handle_turn(char *line) { return EXIT_SUCCESS; } -static int human = 1; +static int human; static void new_game(uint8_t size) { reset_state(size); - human = 0; + human = 1; printf("New %dx%d game!\n",size,size); if (gamelog) gamelog = realloc(gamelog, sizeof(char)); else gamelog = malloc(sizeof(char)); @@ -317,7 +317,7 @@ ct1986_turn(const uint8_t max_depth) { fflush(stdout); // Run the minimax float minimax = ct1986_generate(max_depth); - if (minimax < -infty) { + if (minimax <= -infty) { puts("] Opponent concedes!"); } else { printf("] Result: %s (%.3f)\n", @@ -410,7 +410,7 @@ main(int argc, char **argv) { if (human && line == NULL) { playing = 0; } else { - ct1986_turn(1); + ct1986_turn(3); human = 1; } } |
