summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2018-03-12 12:24:34 +0100
committertomsmeding <tom.smeding@gmail.com>2018-03-12 12:24:34 +0100
commitf0163d7e905a65c13e2fab35bf3b8fec3c7b726d (patch)
treedd22486b030565f9068c705cdfd7bc5fa6d9b20c
parent56029c1a5c6d901c602713488c2b8d19b195620b (diff)
Queen can move to the other side of the bord please
-rw-r--r--board.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/board.cpp b/board.cpp
index 75579e0..0ac5348 100644
--- a/board.cpp
+++ b/board.cpp
@@ -237,7 +237,7 @@ vector<Board> Board::subsequents() const {
for (int dy = -1; dy <= 1; dy++)
for (int dx = -1; dx <= 1; dx++) {
if (dx == 0 && dy == 0) continue;
- for (int k = 1; k < 7; k++) {
+ for (int k = 1; k < 8; k++) {
int x2 = x + k * dx, y2 = y + k * dy;
if (x2 < 0 || x2 >= 8 || y2 < 0 || y2 >= 8) break;
if (at(x2, y2) == EMPTY || colour(at(x2, y2)) != clr) {