summaryrefslogtreecommitdiff
path: root/ai_mm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ai_mm.cpp')
-rw-r--r--ai_mm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ai_mm.cpp b/ai_mm.cpp
index 4d9a239..d74f7c7 100644
--- a/ai_mm.cpp
+++ b/ai_mm.cpp
@@ -26,7 +26,7 @@ static int evaluate(Board &bd, uint8_t myclr) {
int idx = BSZ * y + x; \
uint8_t clr = bd[idx]; \
if (clr == 0) continue; \
- for (int i = 1; i <= RLEN; i++, x += (_dx), y += (_dy), idx += BSZ * (_dy) + (_dx)) { \
+ for (int i = 1; i <= RLEN; i++, idx += BSZ * (_dy) + (_dx)) { \
if (bd[idx] != clr) break; \
score += i * (3 - 2 * clr); \
} \
@@ -37,7 +37,7 @@ static int evaluate(Board &bd, uint8_t myclr) {
CHECK(bounds.left , bounds.right - (RLEN-1), bounds.top, bounds.bottom , 1, 0);
CHECK(bounds.left , bounds.right - (RLEN-1), bounds.top, bounds.bottom - (RLEN-1), 1, 1);
CHECK(bounds.left , bounds.right , bounds.top, bounds.bottom - (RLEN-1), 0, 1);
- CHECK(bounds.left - (RLEN-1), bounds.right , bounds.top, bounds.bottom - (RLEN-1), -1, 1);
+ CHECK(bounds.left + (RLEN-1), bounds.right , bounds.top, bounds.bottom - (RLEN-1), -1, 1);
#undef CHECK