diff options
Diffstat (limited to 'ai_mm.cpp')
-rw-r--r-- | ai_mm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |