aboutsummaryrefslogtreecommitdiff
path: root/src/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/board.c')
-rw-r--r--src/board.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/board.c b/src/board.c
index a09b45c..92420ed 100644
--- a/src/board.c
+++ b/src/board.c
@@ -59,6 +59,11 @@ void traverse_structure(int group, int index, BoardUnit* board) {
if (board[new_unit].feature == board[index].feature && board[new_unit].structure_group == 0) {
traverse_structure(group, new_unit, board);
}
+ else if (board[new_unit].feature == '*' && board[new_unit].structure_group != board[index].structure_group) {
+ board[new_unit].feature = board[index].feature;
+ traverse_structure(group, new_unit, board);
+ board[new_unit].feature = '*';
+ }
}
}