aboutsummaryrefslogtreecommitdiff
path: root/include/ct1986.c
diff options
context:
space:
mode:
Diffstat (limited to 'include/ct1986.c')
-rw-r--r--include/ct1986.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ct1986.c b/include/ct1986.c
index 8378f8c..5b3125f 100644
--- a/include/ct1986.c
+++ b/include/ct1986.c
@@ -132,7 +132,7 @@ previous_ply(void) {
} else if (cur_depth == max_depth) { \
/* We're at the bottom, evaluate */ \
this = ct1986_evaluate_black_win(); \
- if (min == 0) this = this - 1.0;\
+ if ((ply & 1) == 0) this = this - 1.0; \
} else { \
/* We're not at the bottom, recurse first */ \
next_ply(); \
@@ -194,7 +194,7 @@ ct1986_minimax(const uint8_t cur_depth, const uint8_t max_depth,
// just try everything...
// For every number of steps
- for (uint8_t steps = 1; steps < board_size && steps <= count; steps++) {
+ for (uint8_t steps = 1; steps <= board_size && steps <= count; steps++) {
uint8_t idx, carry;
for (idx = 0; idx < steps; idx++) drops[idx]=0;
idx = 0;