summaryrefslogtreecommitdiff
path: root/include/tak.c
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2021-01-16 00:03:52 -0500
committertslil <tslil@posteo.de>2026-08-28 19:37:41 +0100
commit87d8665b6615c5c572ac0c23d20d26b448eaf483 (patch)
tree38725cd9b43aaa98ba1ba008d53b00c6a4bf9fc6 /include/tak.c
parent5a72da9ae99689a8a3571b23b7a639a4efc58abc (diff)
Another road bug
Diffstat (limited to 'include/tak.c')
-rw-r--r--include/tak.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/tak.c b/include/tak.c
index d8d0a8e..ef4fc7d 100644
--- a/include/tak.c
+++ b/include/tak.c
@@ -297,8 +297,9 @@ check_road_colour(const enum COLOUR colour) {
// First left-to-right
dfs_pntr = 0;
for (uint8_t y=0; y<board_size; y++) {
- if ( COUNT_AT(THE_COORDS(0, y)) &&
- (colours[THE_COORDS(0, y)] & 1) == colour) {
+ if ( COUNT_AT(THE_COORDS(0, y))
+ && (colours[THE_COORDS(0, y)] & 1) == colour
+ && STONE_AT(THE_COORDS(0, y)) != STONE_STANDING ) {
dfs_stack[dfs_pntr++] = THE_COORDS(0, y);
celldat[THE_COORDS(0, y)] |= DFS_MASK;
}
@@ -312,8 +313,9 @@ check_road_colour(const enum COLOUR colour) {
// Then bottom-to-top
dfs_pntr = 0;
for (uint8_t x=0; x<board_size; x++) {
- if ( COUNT_AT(THE_COORDS(x, 0)) &&
- (colours[THE_COORDS(x, 0)] & 1) == colour) {
+ if ( COUNT_AT(THE_COORDS(x, 0))
+ && (colours[THE_COORDS(x, 0)] & 1) == colour
+ && STONE_AT(THE_COORDS(x, 0)) != STONE_STANDING ) {
dfs_stack[dfs_pntr++] = THE_COORDS(x, 0);
celldat[THE_COORDS(x, 0)] |= DFS_MASK;
}