shithub: puzzles

Download patch

ref: f49c7f530cfc5f0cc988be265e243e074279b761
parent: 3627111c5210a5b134b0e8c43b90eed07ca2e17c
author: Kevin Lyles <kevinlyles@gmail.com>
date: Sat May 9 15:16:24 EDT 2015

Handle replacing an existing arrow

--- a/galaxies.c
+++ b/galaxies.c
@@ -373,7 +373,9 @@
     }
 
     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 @@
         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);
 	}