diff options
author | tomsmeding <tom.smeding@gmail.com> | 2019-02-17 12:57:39 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2019-02-17 12:58:11 +0100 |
commit | 49baaba539169b5309c3176d9b5cdea2609664d8 (patch) | |
tree | 8ab0518bce6e319a8f278502970499eb9b516f00 /ai_mm.cpp | |
parent | 2c5ec9426c0f55cf67a12b589a974ff64de061e4 (diff) |
Work on mm ai's
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 |