aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Lyles <kevinlyles@gmail.com>2015-05-09 19:16:24 -0500
committerSimon Tatham <anakin@pobox.com>2015-05-11 11:05:36 +0100
commitf49c7f530cfc5f0cc988be265e243e074279b761 (patch)
tree685b4aa1be4f1950533e4fa819c9f73b7fe7e36d
parent3627111c5210a5b134b0e8c43b90eed07ca2e17c (diff)
downloadpuzzles-f49c7f530cfc5f0cc988be265e243e074279b761.zip
puzzles-f49c7f530cfc5f0cc988be265e243e074279b761.tar.gz
puzzles-f49c7f530cfc5f0cc988be265e243e074279b761.tar.bz2
puzzles-f49c7f530cfc5f0cc988be265e243e074279b761.tar.xz
Handle replacing an existing arrow
-rw-r--r--galaxies.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/galaxies.c b/galaxies.c
index 330b6bb..a50efe4 100644
--- a/galaxies.c
+++ b/galaxies.c
@@ -373,7 +373,9 @@ static void add_assoc_with_opposite(game_state *state, space *tile, space *dot)
}
sfree(colors);
+ remove_assoc_with_opposite(state, tile);
add_assoc(state, tile, dot);
+ remove_assoc_with_opposite(state, opposite);
add_assoc(state, opposite, dot);
}
@@ -2589,7 +2591,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
if (INUI(state, px, py)) {
sp = &SPACE(state, px, py);
- if (!(sp->flags & F_DOT) && !(sp->flags & F_TILE_ASSOC))
+ if (!(sp->flags & F_DOT))
sprintf(buf + strlen(buf), "%sA%d,%d,%d,%d",
sep, px, py, ui->dotx, ui->doty);
}